File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
test cases/common/132 get define Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,13 @@ foreach lang : ['c', 'cpp']
66
66
have = cc.get_define(' MESON_FAIL_VALUE' )
67
67
assert (have == '' , ' MESON_FAIL_VALUE value is "@0@" instead of ""' .format(have))
68
68
69
+ # Check if prefix array works properly and has the expected order
70
+ have = cc.get_define(' MESON_FAIL_VALUE' , prefix : [' #define MESON_FAIL_VALUE 1' , ' #undef MESON_FAIL_VALUE' ])
71
+ assert (have == '' , ' MESON_FAIL_VALUE value is "@0@" instead of ""' .format(have))
72
+
73
+ have = cc.get_define(' MESON_SUCCESS_VALUE' , prefix : [' #undef MESON_SUCCESS_VALUE' , ' #define MESON_SUCCESS_VALUE 1' ])
74
+ assert (have == ' 1' , ' MESON_SUCCESS_VALUE value is "@0@" instead of ""' .format(have))
75
+
69
76
# This is used in the test_preprocessor_checks_CPPFLAGS() unit test.
70
77
have = cc.get_define(' MESON_TEST_DEFINE_VALUE' )
71
78
expect = get_option (' MESON_TEST_DEFINE_VALUE' )
You can’t perform that action at this time.
0 commit comments