From b172d62caeb0aea4479d389f89932df79d453f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 25 Jul 2009 17:04:13 +0200 Subject: [PATCH] Added more tests to the TestPreprocessor::match_cfg_def (#505) --- test/testpreprocessor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index fb24ae1e7..ee6c55ef3 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -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")); }