mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Add some basic tests for #if and related preprocessor directives.
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:
committed by
Alexandre Julliard
parent
52f844d2dc
commit
ca28ac17fb
126
tests/preproc-if.shader_test
Normal file
126
tests/preproc-if.shader_test
Normal file
@@ -0,0 +1,126 @@
|
||||
[preproc]
|
||||
#if 1
|
||||
pass
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
#if 1
|
||||
pass
|
||||
|
||||
[preproc]
|
||||
pass
|
||||
#if 0
|
||||
fail
|
||||
|
||||
[preproc]
|
||||
#if 1
|
||||
pass
|
||||
#else
|
||||
fail
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
#if 0
|
||||
fail
|
||||
#else
|
||||
pass
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
#if 0
|
||||
fail
|
||||
#else
|
||||
pass
|
||||
|
||||
[preproc]
|
||||
#if 0
|
||||
fail
|
||||
#elif 1
|
||||
pass
|
||||
#else
|
||||
fail
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
#if 1
|
||||
pass
|
||||
#elif 1
|
||||
fail
|
||||
#else
|
||||
fail
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
#if 0
|
||||
fail
|
||||
#elif 0
|
||||
fail
|
||||
#else
|
||||
pass
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
#if 0
|
||||
#if 1
|
||||
fail
|
||||
#endif
|
||||
#else
|
||||
#if 0
|
||||
fail
|
||||
#else
|
||||
pass
|
||||
#endif
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
#if 0
|
||||
fail
|
||||
#endif
|
||||
pass
|
||||
|
||||
[preproc]
|
||||
#endif
|
||||
pass
|
||||
|
||||
[preproc]
|
||||
/* The #elif is effectively ignored here. */
|
||||
#if 0
|
||||
fail
|
||||
#else
|
||||
pass
|
||||
#elif 0
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
#if 0
|
||||
fail
|
||||
#else
|
||||
#elif 0
|
||||
pass
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
/* Similarly, the second #else is effectively ignored here. */
|
||||
#if 0
|
||||
fail
|
||||
#else
|
||||
pass
|
||||
#else
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
/* Similarly, the second #else is effectively ignored here. */
|
||||
#if 0
|
||||
fail
|
||||
#else
|
||||
#else
|
||||
pass
|
||||
#endif
|
||||
|
||||
[preproc]
|
||||
#if 0
|
||||
#define KEY fail
|
||||
#else
|
||||
#define KEY pass
|
||||
#endif
|
||||
KEY
|
Reference in New Issue
Block a user