aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2017-02-09 04:36:04 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2017-02-09 04:36:04 -0500
commitd9aa870e5d509cc7309ab82dd102a937ab58613a (patch)
treed92d03d76b5c390b335f1cfd761f1a0b59ec8496 /SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp
parent68ee4cbcbe424b95969c70346283a9f217f63825 (diff)
Imported Upstream version 3.1.1+dfsg1upstream/3.1.1+dfsg1
Diffstat (limited to 'SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp')
-rw-r--r--SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp b/SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp
index 0dc58b0..7355616 100644
--- a/SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp
+++ b/SQLiteStudio3/Tests/ParserTest/tst_parsertest.cpp
@@ -21,6 +21,7 @@ class ParserTest : public QObject
private Q_SLOTS:
void test();
+ void testScientificNumber();
void testUniqConflict();
void testGetTableTokens();
void testGetTableTokens2();
@@ -72,6 +73,15 @@ void ParserTest::test()
TokenList tokens = query->getContextTableTokens();
}
+void ParserTest::testScientificNumber()
+{
+ QString sql = "SELECT 1e100;";
+ TokenList tokens = Lexer::tokenize(sql, Dialect::Sqlite3);
+
+ QVERIFY(tokens.size() == 4);
+ QVERIFY(tokens[2]->type == Token::Type::FLOAT);
+}
+
void ParserTest::testGetTableTokens()
{
QString sql = "select someTable.* FROM someTable;";