Remove use of ASSERT_THAT

This commit is contained in:
Eelke Klein 2017-08-26 19:07:01 +02:00
parent 4c658d7811
commit 78a4c6d730
5 changed files with 53 additions and 54 deletions

View file

@ -15,24 +15,24 @@ TEST(SqlLexer, lexer)
QString out;
lexer.nextBasicToken(startpos, length, tokentype, out);
ASSERT_THAT(startpos, Eq(1));
ASSERT_THAT(length, Eq(6));
ASSERT_THAT(tokentype, Eq(BasicTokenType::Symbol));
ASSERT_THAT( out, Eq(QString("SELECT")) );
ASSERT_EQ(startpos, 1);
ASSERT_EQ(length, 6);
ASSERT_EQ(tokentype, BasicTokenType::Symbol);
ASSERT_EQ( out, QString("SELECT") );
}
TEST(SqlLexer, lexer_quote_in_string)
{
QString input = " 'abc''def' ";
SqlLexer lexer(input, LexerState::Null);
QString input = " 'abc''def' ";
SqlLexer lexer(input, LexerState::Null);
int startpos, length;
BasicTokenType tokentype;
QString out;
lexer.nextBasicToken(startpos, length, tokentype, out);
ASSERT_THAT(startpos, Eq(1));
ASSERT_THAT(length, Eq(10));
ASSERT_THAT(tokentype, Eq(BasicTokenType::QuotedString));
int startpos, length;
BasicTokenType tokentype;
QString out;
lexer.nextBasicToken(startpos, length, tokentype, out);
ASSERT_EQ(startpos, 1);
ASSERT_EQ(length, 10);
ASSERT_EQ(tokentype, BasicTokenType::QuotedString);
}