[vala/0.38] tests: Add "preprocessor" parser test to increase coverage



commit 35c0d2f3b2ff708708f23329146e43a8371f64ac
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Jan 7 15:39:44 2018 +0100

    tests: Add "preprocessor" parser test to increase coverage

 tests/Makefile.am              |    1 +
 tests/parser/preprocessor.vala |    9 +++++++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2f0fdaa..4df7b66 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
index 0000000..de71b2a
--- /dev/null
+++ b/tests/parser/preprocessor.vala
@@ -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
+}


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