Mesa (master): glcpp: Add new test showing bug where a trailing ':' prevents macro expansion

Carl Worth cworth at kemper.freedesktop.org
Thu Feb 2 21:29:45 UTC 2012


Module: Mesa
Branch: master
Commit: e931b0e05b19259b0f5b53faf73b375013ab1cb3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e931b0e05b19259b0f5b53faf73b375013ab1cb3

Author: Carl Worth <cworth at cworth.org>
Date:   Sat Jan 21 09:22:24 2012 -0800

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 <kenneth at whitecape.org>

---

 src/glsl/glcpp/tests/100-macro-with-colon.c        |    7 +++++++
 .../glcpp/tests/100-macro-with-colon.c.expected    |    8 ++++++++
 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 0000000..31dbb9a
--- /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 0000000..6cfac25
--- /dev/null
+++ b/src/glsl/glcpp/tests/100-macro-with-colon.c.expected
@@ -0,0 +1,8 @@
+
+
+
+switch (1) {
+ case 1 + 2:
+ break;
+}
+




More information about the mesa-commit mailing list