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