msvc2015 compile ok

This commit is contained in:
Hamed.Masafi 2019-02-26 19:56:48 +03:30
parent d5487966dc
commit deba877e48
7 changed files with 49 additions and 10 deletions

View File

@ -8,7 +8,7 @@
.arg(timer.elapsed() / 1000.) \ .arg(timer.elapsed() / 1000.) \
.arg(__func__) .arg(__func__)
#define DRIVER "QMYSQL" #define DRIVER "QSQLITE"
#define DATABASE QString(metaObject()->className()).toLower() + "_db" #define DATABASE QString(metaObject()->className()).toLower() + "_db"
#define HOST "localhost" #define HOST "localhost"
#define USERNAME "root" #define USERNAME "root"

View File

@ -4,9 +4,9 @@ TARGET = tst_datatypes
TEMPLATE = app TEMPLATE = app
CONFIG += warn_on c++11 CONFIG += warn_on c++11
INCLUDEPATH += $$PWD/../../src $$PWD/../common
include(../../nut.pri) include(../common/nut-lib.pri)
IMPORTPATH += $$OUT_PWD/../src/imports
SOURCES += \ SOURCES += \
db.cpp \ db.cpp \
sampletable.cpp \ sampletable.cpp \

View File

@ -1,4 +1,4 @@
QT += testlib QT += testlib sql
QT -= gui QT -= gui
CONFIG += qt console warn_on depend_includepath testcase CONFIG += qt console warn_on depend_includepath testcase

View File

@ -50,6 +50,9 @@ void MainTest::numeric()
auto p22 = p3 == p4; auto p22 = p3 == p4;
auto p23 = f == n + 1; auto p23 = f == n + 1;
auto p24 = n = 4;
auto p26 = (n = 4) & (n = 5);
auto p27 = n | f;
} }
void MainTest::string() void MainTest::string()
@ -107,4 +110,29 @@ void MainTest::extra()
auto p2 = url == "http://google.com"; 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) QTEST_MAIN(MainTest)

View File

@ -6,6 +6,12 @@
class Post; class Post;
class User; class User;
namespace Nut {
class PhraseList;
class AssignmentPhraseList;
class ConditionalPhrase;
}
class MainTest : public QObject class MainTest : public QObject
{ {
Q_OBJECT Q_OBJECT
@ -24,6 +30,13 @@ private slots:
void boolean(); void boolean();
void datetime(); void datetime();
void extra(); 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 #endif // MAINTEST_H

View File

@ -3,11 +3,10 @@ QT -= gui
TARGET = tst_uuid TARGET = tst_uuid
TEMPLATE = app TEMPLATE = app
CONFIG += warn_on c++11 CONFIG += warn_on c++11
INCLUDEPATH += $$PWD/../../src $$PWD/../common
include(../../nut.pri) include(../common/nut-lib.pri)
IMPORTPATH += $$OUT_PWD/../src/imports
SOURCES += \ SOURCES += \
testdatabase.cpp \ testdatabase.cpp \
test.cpp \ test.cpp \

View File

@ -3,7 +3,6 @@ QT -= gui
TARGET = tst_upgrades TARGET = tst_upgrades
TEMPLATE = app TEMPLATE = app
CONFIG += warn_on c++11 CONFIG += warn_on c++11
include(../common/nut-lib.pri) include(../common/nut-lib.pri)