Added more tests to the TestPreprocessor::match_cfg_def (#505)
This commit is contained in:
parent
2544bd8805
commit
b172d62cae
|
@ -523,10 +523,17 @@ private:
|
||||||
|
|
||||||
void match_cfg_def()
|
void match_cfg_def()
|
||||||
{
|
{
|
||||||
|
TODO_ASSERT_EQUALS(false, Preprocessor::match_cfg_def("ABC", "defined(A)"));
|
||||||
|
TODO_ASSERT_EQUALS(true, Preprocessor::match_cfg_def("ABC", "!defined(A)"));
|
||||||
|
|
||||||
|
ASSERT_EQUALS(false, Preprocessor::match_cfg_def("A", "!defined(A)&&!defined(B)"));
|
||||||
|
TODO_ASSERT_EQUALS(true, Preprocessor::match_cfg_def("C", "!defined(A)&&!defined(B)"));
|
||||||
|
|
||||||
TODO_ASSERT_EQUALS(true, Preprocessor::match_cfg_def("A=1", "A==1"));
|
TODO_ASSERT_EQUALS(true, Preprocessor::match_cfg_def("A=1", "A==1"));
|
||||||
TODO_ASSERT_EQUALS(true, Preprocessor::match_cfg_def("A=1", "A<2"));
|
TODO_ASSERT_EQUALS(true, Preprocessor::match_cfg_def("A=1", "A<2"));
|
||||||
ASSERT_EQUALS(false, Preprocessor::match_cfg_def("A=1", "A==2"));
|
ASSERT_EQUALS(false, Preprocessor::match_cfg_def("A=1", "A==2"));
|
||||||
ASSERT_EQUALS(false, Preprocessor::match_cfg_def("A=1", "A<1"));
|
ASSERT_EQUALS(false, Preprocessor::match_cfg_def("A=1", "A<1"));
|
||||||
|
TODO_ASSERT_EQUALS(true, Preprocessor::match_cfg_def("A=2;B=1;C", "A>=1&&B<=A"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue