msvc2015 compile ok
This commit is contained in:
parent
d5487966dc
commit
deba877e48
|
|
@ -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"
|
||||||
|
|
|
||||||
|
|
@ -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 \
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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 \
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue