[vala/0.36] tests: Add "assignment" operator parser tests to increase coverage



commit b7f2a8bbb80188d9fedc3ac036ffedf0f638f7fe
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Jan 7 15:27:57 2018 +0100

    tests: Add "assignment" operator parser tests to increase coverage

 tests/Makefile.am            |    1 +
 tests/parser/assignment.vala |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 67edd68..a35d4de 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -315,6 +315,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 0000000..ceef7cf
--- /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;
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]