Token: Added testcase for matching of %op%

This commit is contained in:
Daniel Marjamäki 2011-04-10 11:15:57 +02:00
parent 57869e96e3
commit af60f2c4ef
1 changed files with 6 additions and 0 deletions

View File

@ -230,6 +230,12 @@ private:
ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "&&|%oror%"));
ASSERT_EQUALS(true, Token::Match(logicalOr.tokens(), "%oror%|&&"));
}
void matchOp()
{
givenACodeSampleToTokenize op("+");
ASSERT_EQUALS(true, Token::Match(op.tokens(), "%op%"));
}
};
REGISTER_TEST(TestToken)