]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add "preprocessor" parser test to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 7 Jan 2018 14:39:44 +0000 (15:39 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 7 Jan 2018 19:26:03 +0000 (20:26 +0100)
tests/Makefile.am
tests/parser/preprocessor.vala [new file with mode: 0644]

index 4e75436d2aa00bf690a4d05e558956956e5203e6..a93a6f5775c5abfdb121eb608f34af5c566d657b 100644 (file)
@@ -323,6 +323,7 @@ TESTS = \
        annotations/noaccessormethod.test \
        parser/assignment.vala \
        parser/do-statement.vala \
+       parser/preprocessor.vala \
        parser/switch-statement.vala \
        parser/template.vala \
        parser/tuple.vala \
diff --git a/tests/parser/preprocessor.vala b/tests/parser/preprocessor.vala
new file mode 100644 (file)
index 0000000..de71b2a
--- /dev/null
@@ -0,0 +1,9 @@
+void main () {
+#if VALA_NEVER_SET_FOO
+       assert_not_reached ();
+#elif VALA_NEVER_SET_BAR
+       assert_not_reached ();
+#else
+       assert (true);
+#endif
+}