[vala/staging] tests: Add "preprocessor" parser test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] tests: Add "preprocessor" parser test to increase coverage
- Date: Sun, 7 Jan 2018 20:04:55 +0000 (UTC)
commit 3d8a753f4ce48a01da2b2faf9e2849559a9516d8
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 4e75436..a93a6f5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
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]