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@whitecape.org>
This commit is contained in:
7
src/glsl/glcpp/tests/100-macro-with-colon.c
Normal file
7
src/glsl/glcpp/tests/100-macro-with-colon.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#define one 1
|
||||
#define two 2
|
||||
|
||||
switch (1) {
|
||||
case one + two:
|
||||
break;
|
||||
}
|
8
src/glsl/glcpp/tests/100-macro-with-colon.c.expected
Normal file
8
src/glsl/glcpp/tests/100-macro-with-colon.c.expected
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
|
||||
switch (1) {
|
||||
case 1 + 2:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user