Builds on windows again
This commit is contained in:
parent
33cf39b799
commit
bebb3391c3
160 changed files with 138 additions and 117 deletions
|
|
@ -1,38 +0,0 @@
|
|||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock-matchers.h>
|
||||
#include "SqlLexer.h"
|
||||
|
||||
using namespace testing;
|
||||
|
||||
|
||||
TEST(SqlLexer, lexer)
|
||||
{
|
||||
QString input = " SELECT ";
|
||||
SqlLexer lexer(input, LexerState::Null);
|
||||
|
||||
int startpos, length;
|
||||
BasicTokenType tokentype;
|
||||
QString out;
|
||||
lexer.nextBasicToken(startpos, length, tokentype, out);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue