]> 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>
Wed, 10 Jan 2018 19:45:59 +0000 (20:45 +0100)
tests/Makefile.am
tests/parser/preprocessor.vala [new file with mode: 0644]

index 2f0fdaaf61657fe6bb4aa36700553b40c138a8cf..4df7b6685a7a668f05b4740f12531639f9be19d7 100644 (file)
@@ -319,6 +319,7 @@ TESTS = \
        annotations/noaccessormethod.test \
        parser/assignment.vala \
        parser/do-statement.vala \
+       parser/preprocessor.vala \
        parser/template.vala \
        parser/tuple.vala \
        $(NULL)
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
+}