]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add "assignment" operator parser tests to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 7 Jan 2018 14:27:57 +0000 (15:27 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 10 Jan 2018 19:45:29 +0000 (20:45 +0100)
tests/Makefile.am
tests/parser/assignment.vala [new file with mode: 0644]

index 7f11b093e5dd4a93ffd2be6faeb12220c35165af..2f0fdaaf61657fe6bb4aa36700553b40c138a8cf 100644 (file)
@@ -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 (file)
index 0000000..ceef7cf
--- /dev/null
@@ -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;
+}