diff options
Diffstat (limited to 'glcpp')
-rw-r--r-- | glcpp/tests/065-if-defined-parens.c | 17 | ||||
-rw-r--r-- | glcpp/tests/065-if-defined-parens.c.expected | 18 |
2 files changed, 35 insertions, 0 deletions
diff --git a/glcpp/tests/065-if-defined-parens.c b/glcpp/tests/065-if-defined-parens.c new file mode 100644 index 0000000000..48aa0f8c3e --- /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 0000000000..3f01955ee4 --- /dev/null +++ b/glcpp/tests/065-if-defined-parens.c.expected @@ -0,0 +1,18 @@ + + + +success_1 + + + +success_2 + + + + + + + +success_3 + + |