Test 'Preprocessor: Proper fix for #3690'

This commit is contained in:
Daniel Marjamäki 2012-07-13 13:04:10 +02:00
parent 5645269bbf
commit c6fdd2733b
1 changed files with 1 additions and 0 deletions

View File

@ -3540,6 +3540,7 @@ private:
Preprocessor preprocessor(&settings, this); Preprocessor preprocessor(&settings, this);
ASSERT_EQUALS(true, preprocessor.validateCfg("", "X=42")); // don't hang when parsing cfg ASSERT_EQUALS(true, preprocessor.validateCfg("", "X=42")); // don't hang when parsing cfg
ASSERT_EQUALS(false, preprocessor.validateCfg("int y=Y;", "X=42;Y"));
ASSERT_EQUALS(false, preprocessor.validateCfg("int x=X;", "X")); ASSERT_EQUALS(false, preprocessor.validateCfg("int x=X;", "X"));
ASSERT_EQUALS(false, preprocessor.validateCfg("X=1;", "X")); ASSERT_EQUALS(false, preprocessor.validateCfg("X=1;", "X"));
ASSERT_EQUALS(true, preprocessor.validateCfg("int x=X;", "Y")); ASSERT_EQUALS(true, preprocessor.validateCfg("int x=X;", "Y"));