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.39.4~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74d9501b4131afc508442cda51365a19caf38a4f;p=thirdparty%2Fvala.git tests: Add "assignment" operator parser tests to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 196a61ba3..4e75436d2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -321,6 +321,7 @@ TESTS = \ annotations/deprecated.vala \ annotations/description.vala \ annotations/noaccessormethod.test \ + parser/assignment.vala \ parser/do-statement.vala \ parser/switch-statement.vala \ parser/template.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; +}