From: Rico Tzschichholz Date: Sun, 7 Jan 2018 14:27:57 +0000 (+0100) Subject: tests: Add "assignment" operator parser tests to increase coverage X-Git-Tag: 0.38.5~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82703cd0a1b058691faff79709d76a218176159c;p=thirdparty%2Fvala.git tests: Add "assignment" operator parser tests to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 7f11b093e..2f0fdaaf6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -317,6 +317,7 @@ TESTS = \ annotations/deprecated.vala \ annotations/description.vala \ annotations/noaccessormethod.test \ + parser/assignment.vala \ parser/do-statement.vala \ parser/template.vala \ parser/tuple.vala \ diff --git a/tests/parser/assignment.vala b/tests/parser/assignment.vala new file mode 100644 index 000000000..ceef7cf97 --- /dev/null +++ b/tests/parser/assignment.vala @@ -0,0 +1,14 @@ +void main () { + // operators + int i = 1; + i += 2; + i -= 2; + i *= 2; + i /= 2; + i |= 1; + i &= 1; + i ^= 1; + i %= 1; + i <<= 2; + i >>= 2; +}