summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glsl/glcpp/tests/101-macros-used-twice.c16
-rw-r--r--src/glsl/glcpp/tests/101-macros-used-twice.c.expected17
2 files changed, 33 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/101-macros-used-twice.c b/src/glsl/glcpp/tests/101-macros-used-twice.c
new file mode 100644
index 00000000000..e1693805b6a
--- /dev/null
+++ b/src/glsl/glcpp/tests/101-macros-used-twice.c
@@ -0,0 +1,16 @@
+#define object 1
+#define function(x) 1
+
+#if object
+once
+#endif
+#if object
+twice
+#endif
+
+#if function(0)
+once
+#endif
+#if function(0)
+once again
+#endif
diff --git a/src/glsl/glcpp/tests/101-macros-used-twice.c.expected b/src/glsl/glcpp/tests/101-macros-used-twice.c.expected
new file mode 100644
index 00000000000..1a4bf15362b
--- /dev/null
+++ b/src/glsl/glcpp/tests/101-macros-used-twice.c.expected
@@ -0,0 +1,17 @@
+
+
+
+
+once
+
+
+twice
+
+
+
+once
+
+
+once again
+
+