diff options
author | Timothy Arceri <tarceri@itsqueeze.com> | 2018-08-29 11:33:30 +1000 |
---|---|---|
committer | Timothy Arceri <tarceri@itsqueeze.com> | 2018-08-30 10:33:33 +1000 |
commit | c62214f1a688b8c971f0725ec18ead82994b1b44 (patch) | |
tree | 1446c591b77f44eed7a266f810a6980f7c773082 | |
parent | ae7240e1ff578e8f6f98c0444d7e526097116ac4 (diff) |
glsl-1.10: add some preprocessor stringification tests
>From Section 3.3. (Preprocessor) of the GLSL 4.60 spec:
"The following operators are also available:
defined
##
...
Any directive not listed above will cause a compile-time error."
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
-rw-r--r-- | tests/spec/glsl-1.10/compiler/preprocessor/stringification-in-unreachable-branch.frag | 12 | ||||
-rw-r--r-- | tests/spec/glsl-1.10/compiler/preprocessor/stringification.frag | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.10/compiler/preprocessor/stringification-in-unreachable-branch.frag b/tests/spec/glsl-1.10/compiler/preprocessor/stringification-in-unreachable-branch.frag new file mode 100644 index 000000000..32b1798b8 --- /dev/null +++ b/tests/spec/glsl-1.10/compiler/preprocessor/stringification-in-unreachable-branch.frag @@ -0,0 +1,12 @@ +// [config] +// expect_result: pass +// glsl_version: 1.10 +// [end config] + +#version 110 + +#ifdef this_is_undefined +#define VEC4_STRING_PARAM(a, b, c, d) vec4(#a, #b, c, d) +#endif + +void main() { } diff --git a/tests/spec/glsl-1.10/compiler/preprocessor/stringification.frag b/tests/spec/glsl-1.10/compiler/preprocessor/stringification.frag new file mode 100644 index 000000000..617ad102d --- /dev/null +++ b/tests/spec/glsl-1.10/compiler/preprocessor/stringification.frag @@ -0,0 +1,10 @@ +// [config] +// expect_result: fail +// glsl_version: 1.10 +// [end config] + +#version 110 + +#define VEC4_STRING_PARAM(a, b, c, d) vec4(#a, #b, c, d) + +void main() { } |