vkd3d/tests/preproc-ifdef.shader_test
Zebediah Figura f8ad29aad0 tests: Add some tests for #ifdef and defined().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 22:07:47 +01:00

90 lines
672 B
Plaintext

[preproc]
#define KEY
#ifdef KEY
pass
#endif
[preproc]
#define KEY
#if defined(KEY)
pass
#endif
[preproc]
#define KEY
#if defined KEY
pass
#endif
[preproc]
#ifndef KEY
pass
#endif
[preproc]
#if !defined(KEY)
pass
#endif
[preproc]
#define KEY
#ifndef KEY
fail
#else
pass
#endif
[preproc]
#ifdef KEY
fail
#else
pass
#endif
[preproc]
#define KEY(a, b)
#ifdef KEY
pass
#endif
[preproc]
#ifdef KEY
fail
#endif
#define KEY
pass
[preproc]
#define KEY 0
#ifdef KEY
pass
#endif
[preproc]
#define KEY
#undef KEY
#ifndef KEY
pass
#endif
[preproc]
#if KEY
fail
#else
pass
#endif
[preproc]
#if KEY == 0
pass
#else
fail
#endif
[preproc]
#if KEY == 1
fail
#else
pass
#endif