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