summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests/050-if-defined.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/glcpp/tests/050-if-defined.c')
-rw-r--r--src/glsl/glcpp/tests/050-if-defined.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/050-if-defined.c b/src/glsl/glcpp/tests/050-if-defined.c
new file mode 100644
index 00000000000..34f0f95140e
--- /dev/null
+++ b/src/glsl/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