Added more tests to the TestPreprocessor::match_cfg_def (#505)

This commit is contained in:
Daniel Marjamäki 2009-07-25 17:04:13 +02:00
parent 2544bd8805
commit b172d62cae
1 changed files with 7 additions and 0 deletions

View File

@ -523,10 +523,17 @@ private:
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<2"));
ASSERT_EQUALS(false, Preprocessor::match_cfg_def("A=1", "A==2"));
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"));
}