From: Carl Worth Date: Wed, 2 Jul 2014 00:44:55 +0000 (-0700) Subject: glsl/glcpp: Add test for "#define without macro name" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b76482e7312827ab13f37ab9a7e3c8eef30bfe7a;p=mesa.git glsl/glcpp: Add test for "#define without macro name" This ensures that the previous commit indeed generates the expected error message when a "#define" directive is not followed by anything except for a newline. Reviewed-by: Ian Romanick --- diff --git a/src/glsl/glcpp/tests/139-define-without-macro-name.c b/src/glsl/glcpp/tests/139-define-without-macro-name.c new file mode 100644 index 00000000000..de3ed986dc9 --- /dev/null +++ b/src/glsl/glcpp/tests/139-define-without-macro-name.c @@ -0,0 +1,2 @@ +#define +Error expected because no macro name is ever given! diff --git a/src/glsl/glcpp/tests/139-define-without-macro-name.c.expected b/src/glsl/glcpp/tests/139-define-without-macro-name.c.expected new file mode 100644 index 00000000000..000aeaf0f71 --- /dev/null +++ b/src/glsl/glcpp/tests/139-define-without-macro-name.c.expected @@ -0,0 +1,2 @@ +0:1(1): preprocessor error: #define without macro name +Error expected because no macro name is ever given!