summaryrefslogtreecommitdiff
path: root/tests/044-if-1-else.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-20 22:27:07 -0700
committerCarl Worth <cworth@cworth.org>2010-05-20 22:27:07 -0700
commitb20d33c5c6fea8e392c26e9ab060efd14034f1f9 (patch)
tree0285aa21a9c693a155d02a1b1f715137b49f494c /tests/044-if-1-else.c
parentd8327e575dd20fe696f3a44ada4bd4001b15db27 (diff)
Implement #if, #else, #elif, and #endif with tests.
So far the only expression implemented is a single integer literal, but obviously that's easy to extend. Various things including nesting are tested here.
Diffstat (limited to 'tests/044-if-1-else.c')
-rw-r--r--tests/044-if-1-else.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/044-if-1-else.c b/tests/044-if-1-else.c
new file mode 100644
index 0000000000..28dfc25c6f
--- /dev/null
+++ b/tests/044-if-1-else.c
@@ -0,0 +1,7 @@
+success_1
+#if 1
+success_2
+#else
+failure
+#endif
+success_3