summaryrefslogtreecommitdiff
path: root/glcpp/tests/050-if-defined.c
diff options
context:
space:
mode:
Diffstat (limited to 'glcpp/tests/050-if-defined.c')
-rw-r--r--glcpp/tests/050-if-defined.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/glcpp/tests/050-if-defined.c b/glcpp/tests/050-if-defined.c
new file mode 100644
index 0000000000..34f0f95140
--- /dev/null
+++ b/glcpp/tests/050-if-defined.c
@@ -0,0 +1,17 @@
+#if defined foo
+failure_1
+#else
+success_1
+#endif
+#define foo
+#if defined foo
+success_2
+#else
+failure_2
+#endif
+#undef foo
+#if defined foo
+failure_3
+#else
+success_3
+#endif