diff --git a/test/common/consts.h b/test/common/consts.h index d550036..8a8a532 100644 --- a/test/common/consts.h +++ b/test/common/consts.h @@ -8,7 +8,7 @@ .arg(timer.elapsed() / 1000.) \ .arg(__func__) -#define DRIVER "QMYSQL" +#define DRIVER "QSQLITE" #define DATABASE QString(metaObject()->className()).toLower() + "_db" #define HOST "localhost" #define USERNAME "root" diff --git a/test/tst_datatypes/tst_datatypes.pro b/test/tst_datatypes/tst_datatypes.pro index 48da9a6..5f17888 100644 --- a/test/tst_datatypes/tst_datatypes.pro +++ b/test/tst_datatypes/tst_datatypes.pro @@ -4,9 +4,9 @@ TARGET = tst_datatypes TEMPLATE = app CONFIG += warn_on c++11 -INCLUDEPATH += $$PWD/../../src $$PWD/../common -include(../../nut.pri) -IMPORTPATH += $$OUT_PWD/../src/imports + +include(../common/nut-lib.pri) + SOURCES += \ db.cpp \ sampletable.cpp \ diff --git a/test/tst_generators/tst_generators.pro b/test/tst_generators/tst_generators.pro index ed4d9f2..cc1acdf 100644 --- a/test/tst_generators/tst_generators.pro +++ b/test/tst_generators/tst_generators.pro @@ -1,4 +1,4 @@ -QT += testlib +QT += testlib sql QT -= gui CONFIG += qt console warn_on depend_includepath testcase diff --git a/test/tst_phrases/tst_phrases.cpp b/test/tst_phrases/tst_phrases.cpp index d9d26c0..cca7753 100644 --- a/test/tst_phrases/tst_phrases.cpp +++ b/test/tst_phrases/tst_phrases.cpp @@ -50,6 +50,9 @@ void MainTest::numeric() auto p22 = p3 == p4; auto p23 = f == n + 1; + auto p24 = n = 4; + auto p26 = (n = 4) & (n = 5); + auto p27 = n | f; } void MainTest::string() @@ -107,4 +110,29 @@ void MainTest::extra() auto p2 = url == "http://google.com"; } +void MainTest::select(const PhraseList &ph) +{ + +} + +void MainTest::where(const ConditionalPhrase &ph) +{ + +} + +void MainTest::update(const AssignmentPhraseList &p) +{ + +} + +void MainTest::insert(const AssignmentPhraseList &p) +{ + +} + +void MainTest::order_by(const PhraseList &ph) +{ + +} + QTEST_MAIN(MainTest) diff --git a/test/tst_phrases/tst_phrases.h b/test/tst_phrases/tst_phrases.h index 8c6dc28..017cc55 100644 --- a/test/tst_phrases/tst_phrases.h +++ b/test/tst_phrases/tst_phrases.h @@ -6,6 +6,12 @@ class Post; class User; + +namespace Nut { +class PhraseList; +class AssignmentPhraseList; +class ConditionalPhrase; +} class MainTest : public QObject { Q_OBJECT @@ -24,6 +30,13 @@ private slots: void boolean(); void datetime(); void extra(); + +private: + void select(const Nut::PhraseList &ph); + void where(const Nut::ConditionalPhrase &ph); + void update(const Nut::AssignmentPhraseList &p); + void insert(const Nut::AssignmentPhraseList &p); + void order_by(const Nut::PhraseList &ph); }; #endif // MAINTEST_H diff --git a/test/tst_quuid/tst_quuid.pro b/test/tst_quuid/tst_quuid.pro index 0d5c766..b12a283 100644 --- a/test/tst_quuid/tst_quuid.pro +++ b/test/tst_quuid/tst_quuid.pro @@ -3,11 +3,10 @@ QT -= gui TARGET = tst_uuid TEMPLATE = app - CONFIG += warn_on c++11 -INCLUDEPATH += $$PWD/../../src $$PWD/../common -include(../../nut.pri) -IMPORTPATH += $$OUT_PWD/../src/imports + +include(../common/nut-lib.pri) + SOURCES += \ testdatabase.cpp \ test.cpp \ diff --git a/test/tst_upgrades/tst_upgrades.pro b/test/tst_upgrades/tst_upgrades.pro index 8b8b636..41a7cca 100644 --- a/test/tst_upgrades/tst_upgrades.pro +++ b/test/tst_upgrades/tst_upgrades.pro @@ -3,7 +3,6 @@ QT -= gui TARGET = tst_upgrades TEMPLATE = app - CONFIG += warn_on c++11 include(../common/nut-lib.pri)