From: Kenneth Graunke Date: Sat, 19 Jun 2010 06:04:44 +0000 (-0700) Subject: glcpp/tests: Add a test for #if defined (identifier) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bac0e371e373bc51b1b3c575d0a46e324c36bc4f;p=mesa.git glcpp/tests: Add a test for #if defined (identifier) Previously we only tested #if defined identifier (without parenthesis). --- diff --git a/glcpp/tests/065-if-defined-parens.c b/glcpp/tests/065-if-defined-parens.c new file mode 100644 index 00000000000..48aa0f8c3ef --- /dev/null +++ b/glcpp/tests/065-if-defined-parens.c @@ -0,0 +1,17 @@ +#if defined(foo) +failure_1 +#else +success_1 +#endif +#define foo +#if defined ( foo ) +success_2 +#else +failure_2 +#endif +#undef foo +#if defined (foo) +failure_3 +#else +success_3 +#endif diff --git a/glcpp/tests/065-if-defined-parens.c.expected b/glcpp/tests/065-if-defined-parens.c.expected new file mode 100644 index 00000000000..3f01955ee40 --- /dev/null +++ b/glcpp/tests/065-if-defined-parens.c.expected @@ -0,0 +1,18 @@ + + + +success_1 + + + +success_2 + + + + + + + +success_3 + +