[vala/0.36: 139/212] tests: Add "preprocessor" parser test to increase coverage



commit 18f569f6b72e611f51b0357ecbef8bbe1fccf65b
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 a35d4de..7773522 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -317,6 +317,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]