From 201485bae0fcba4db61ceb1e9d9916778b5bba74 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 29 Sep 2011 22:24:18 -0700 Subject: glcpp: Add a test for #elif with an undefined macro. As written, this test correctly raises an error for #elif being used with an undefined macro (and not as an argument to "defined"). If the preceding #if were '#if 1' then this diagnositc would correctly be hidden. That allows code such as the following to not raise an error: #ifndef MAYBE_UNDEFINED #elif MAYBE_UNDEFINED < 5 ... #endif So this test case is working as expected already. We add it here just to improve test coverage. Reviewed-by: Kenneth Graunke Signed-off-by: Carl Worth --- src/glsl/glcpp/tests/098-elif-undefined.c.expected | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/glsl/glcpp/tests/098-elif-undefined.c.expected (limited to 'src/glsl/glcpp/tests/098-elif-undefined.c.expected') diff --git a/src/glsl/glcpp/tests/098-elif-undefined.c.expected b/src/glsl/glcpp/tests/098-elif-undefined.c.expected new file mode 100644 index 00000000000..de967eac438 --- /dev/null +++ b/src/glsl/glcpp/tests/098-elif-undefined.c.expected @@ -0,0 +1,5 @@ +0:2(22): preprocessor error: syntax error, unexpected IDENTIFIER +0:1(7): preprocessor error: Unterminated #if + + + -- cgit v1.2.3