mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Add some more miscellaneous preprocessor tests.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3bf15d6345
commit
e44f2fbf43
@ -69,6 +69,7 @@ vkd3d_shader_tests = \
|
|||||||
tests/preproc-if-expr.shader_test \
|
tests/preproc-if-expr.shader_test \
|
||||||
tests/preproc-invalid.shader_test \
|
tests/preproc-invalid.shader_test \
|
||||||
tests/preproc-macro.shader_test \
|
tests/preproc-macro.shader_test \
|
||||||
|
tests/preproc-misc.shader_test \
|
||||||
tests/swizzle-0.shader_test \
|
tests/swizzle-0.shader_test \
|
||||||
tests/swizzle-1.shader_test \
|
tests/swizzle-1.shader_test \
|
||||||
tests/swizzle-2.shader_test \
|
tests/swizzle-2.shader_test \
|
||||||
@ -216,6 +217,7 @@ XFAIL_TESTS = \
|
|||||||
tests/preproc-if-expr.shader_test \
|
tests/preproc-if-expr.shader_test \
|
||||||
tests/preproc-invalid.shader_test \
|
tests/preproc-invalid.shader_test \
|
||||||
tests/preproc-macro.shader_test \
|
tests/preproc-macro.shader_test \
|
||||||
|
tests/preproc-misc.shader_test \
|
||||||
tests/swizzle-0.shader_test \
|
tests/swizzle-0.shader_test \
|
||||||
tests/swizzle-1.shader_test \
|
tests/swizzle-1.shader_test \
|
||||||
tests/swizzle-2.shader_test \
|
tests/swizzle-2.shader_test \
|
||||||
|
80
tests/preproc-misc.shader_test
Normal file
80
tests/preproc-misc.shader_test
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
[preproc]
|
||||||
|
# define KEY pass
|
||||||
|
KEY
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
#if 0
|
||||||
|
#error
|
||||||
|
#endif
|
||||||
|
pass
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
#define pass fail
|
||||||
|
"pass"
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
#define pass fail
|
||||||
|
" escape \" pass "
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
#define fail pass
|
||||||
|
" escape \\" fail
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
"multiline
|
||||||
|
string"
|
||||||
|
pass
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
"multiline
|
||||||
|
pass"
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
"pass
|
||||||
|
string"
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
/*
|
||||||
|
#error
|
||||||
|
fail
|
||||||
|
* / fail*/pass
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
pass/*
|
||||||
|
#error
|
||||||
|
fail
|
||||||
|
*/
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
pass//fail
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
// multiline comment \
|
||||||
|
fail
|
||||||
|
pass
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
fa/* */il
|
||||||
|
pass
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
#define KEY //
|
||||||
|
KEY pass
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
#define KEY /* fail */ pass
|
||||||
|
KEY
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
#define KEY(a, b) /* multiline
|
||||||
|
|
||||||
|
comment */ a
|
||||||
|
KEY(pass, fail)
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
pass /* fail
|
||||||
|
|
||||||
|
[preproc]
|
||||||
|
/* The backslash must be the last character in the line. */
|
||||||
|
#define KEY \
|
||||||
|
pass
|
Loading…
Reference in New Issue
Block a user