testcase for broken Token::Match %oror%|&&

This commit is contained in:
Robert Reif 2011-07-16 07:28:26 -04:00
parent 0db45a30e5
commit 76960e54a1
1 changed files with 4 additions and 0 deletions

View File

@ -241,6 +241,10 @@ private:
ASSERT_EQUALS(false, Token::Match(bitwiseOr.tokens(), "%oror%")); ASSERT_EQUALS(false, Token::Match(bitwiseOr.tokens(), "%oror%"));
ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "&&|%oror%")); ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "&&|%oror%"));
ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "%oror%|&&")); ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "%oror%|&&"));
givenACodeSampleToTokenize logicalAnd("&&");
ASSERT_EQUALS(true, Token::Match(logicalAnd.tokens(), "&&|%oror%"));
TODO_ASSERT_EQUALS(true, false, Token::Match(logicalAnd.tokens(), "%oror%|&&"));
} }
void matchOp() void matchOp()