summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarl Worth <[email protected]>2012-01-21 09:22:24 -0800
committerCarl Worth <[email protected]>2012-02-02 12:05:21 -0800
commite931b0e05b19259b0f5b53faf73b375013ab1cb3 (patch)
tree60375b7bd9b182cf3c192bc81724249b72011acc /src
parent2e8f8cb383320b83ba5d85c27808ac2d841834e6 (diff)
glcpp: Add new test showing bug where a trailing ':' prevents macro expansion
This demonstrates a bug that was recently triggered in piglit. Here is the original bug report (containing a test case almost identical to this one): https://bugs.freedesktop.org/show_bug.cgi?id=44764 Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/glcpp/tests/100-macro-with-colon.c7
-rw-r--r--src/glsl/glcpp/tests/100-macro-with-colon.c.expected8
2 files changed, 15 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/100-macro-with-colon.c b/src/glsl/glcpp/tests/100-macro-with-colon.c
new file mode 100644
index 00000000000..31dbb9a9edc
--- /dev/null
+++ b/src/glsl/glcpp/tests/100-macro-with-colon.c
@@ -0,0 +1,7 @@
+#define one 1
+#define two 2
+
+switch (1) {
+ case one + two:
+ break;
+}
diff --git a/src/glsl/glcpp/tests/100-macro-with-colon.c.expected b/src/glsl/glcpp/tests/100-macro-with-colon.c.expected
new file mode 100644
index 00000000000..6cfac257b95
--- /dev/null
+++ b/src/glsl/glcpp/tests/100-macro-with-colon.c.expected
@@ -0,0 +1,8 @@
+
+
+
+switch (1) {
+ case 1 + 2:
+ break;
+}
+