Improved test to have all lines reached

This commit is contained in:
Dmitry-Me 2020-03-25 18:11:05 +03:00
parent 5462e43161
commit e1d38a854b
1 changed files with 2 additions and 4 deletions

View File

@ -121,14 +121,12 @@ private:
ASSERT_EQUALS(token->str(), "1");
ASSERT_EQUALS(token->next()->str(), "2");
ASSERT_EQUALS(token->tokAt(2)->str(), "3");
if (last->next())
ASSERT_EQUALS("Null was expected", "");
ASSERT_EQUALS_MSG(true, last->next() == nullptr, "Null was expected");
ASSERT_EQUALS(last->str(), "3");
ASSERT_EQUALS(last->previous()->str(), "2");
ASSERT_EQUALS(last->tokAt(-2)->str(), "1");
if (token->previous())
ASSERT_EQUALS("Null was expected", "");
ASSERT_EQUALS_MSG(true, token->previous() == nullptr, "Null was expected");
TokenList::deleteTokens(token);
}