Fixed #5032: fix wrong unittest case in testtoken::matchNumeric.

This commit is contained in:
Martin Ettl 2013-09-21 17:40:18 +02:00
parent 2fce3e6104
commit 4cc153a6f3
1 changed files with 5 additions and 5 deletions

View File

@ -417,19 +417,19 @@ private:
ASSERT_EQUALS(true, Token::Match(hexadecimal.tokens(), "%num%")); ASSERT_EQUALS(true, Token::Match(hexadecimal.tokens(), "%num%"));
givenACodeSampleToTokenize floatingPoint("0.0f", true); givenACodeSampleToTokenize floatingPoint("0.0f", true);
ASSERT_EQUALS(true, Token::Match(hexadecimal.tokens(), "%num%")); ASSERT_EQUALS(true, Token::Match(floatingPoint.tokens(), "%num%"));
givenACodeSampleToTokenize doublePrecision("0.0d", true); givenACodeSampleToTokenize doublePrecision("0.0d", true);
ASSERT_EQUALS(true, Token::Match(hexadecimal.tokens(), "%num%")); ASSERT_EQUALS(true, Token::Match(doublePrecision.tokens(), "%num%"));
givenACodeSampleToTokenize unsignedInt("0U", true); givenACodeSampleToTokenize unsignedInt("0U", true);
ASSERT_EQUALS(true, Token::Match(hexadecimal.tokens(), "%num%")); ASSERT_EQUALS(true, Token::Match(unsignedInt.tokens(), "%num%"));
givenACodeSampleToTokenize unsignedLong("0UL", true); givenACodeSampleToTokenize unsignedLong("0UL", true);
ASSERT_EQUALS(true, Token::Match(hexadecimal.tokens(), "%num%")); ASSERT_EQUALS(true, Token::Match(unsignedLong.tokens(), "%num%"));
givenACodeSampleToTokenize unsignedLongLong("0ULL", true); givenACodeSampleToTokenize unsignedLongLong("0ULL", true);
ASSERT_EQUALS(true, Token::Match(hexadecimal.tokens(), "%num%")); ASSERT_EQUALS(true, Token::Match(unsignedLongLong.tokens(), "%num%"));
givenACodeSampleToTokenize positive("+666", true); givenACodeSampleToTokenize positive("+666", true);
ASSERT_EQUALS(true, Token::Match(positive.tokens(), "+ %num%")); ASSERT_EQUALS(true, Token::Match(positive.tokens(), "+ %num%"));