another test for travis

This commit is contained in:
Hamed Masafi 2019-02-26 23:38:31 +03:30
parent b22f72374a
commit 6489d7bad4
5 changed files with 14 additions and 10 deletions

View File

@ -89,7 +89,7 @@ AbstractFieldPhraseOperatorField(<=, PhraseData::LessEqual)
AbstractFieldPhraseOperatorField(> , PhraseData::Greater) AbstractFieldPhraseOperatorField(> , PhraseData::Greater)
AbstractFieldPhraseOperatorField(>=, PhraseData::GreaterEqual) AbstractFieldPhraseOperatorField(>=, PhraseData::GreaterEqual)
AbstractFieldPhrase AbstractFieldPhrase::operator !() AbstractFieldPhrase AbstractFieldPhrase::operator ~()
{ {
AbstractFieldPhrase f(data->className, data->fieldName); AbstractFieldPhrase f(data->className, data->fieldName);
f.data->isNot = !data->isNot; f.data->isNot = !data->isNot;

View File

@ -56,7 +56,7 @@ public:
ConditionalPhrase operator <=(const AbstractFieldPhrase &other); ConditionalPhrase operator <=(const AbstractFieldPhrase &other);
ConditionalPhrase operator >=(const AbstractFieldPhrase &other); ConditionalPhrase operator >=(const AbstractFieldPhrase &other);
AbstractFieldPhrase operator !(); AbstractFieldPhrase operator ~();
AssignmentPhrase operator =(const QVariant &other); AssignmentPhrase operator =(const QVariant &other);
AssignmentPhrase operator =(const ConditionalPhrase &other); AssignmentPhrase operator =(const ConditionalPhrase &other);
AssignmentPhrase operator <<(const QVariant &other); AssignmentPhrase operator <<(const QVariant &other);

View File

@ -3,8 +3,7 @@ win32 {
CONFIG(debug,debug|release): LIBDIR = $$absolute_path($$OUT_PWD/../../src/debug) CONFIG(debug,debug|release): LIBDIR = $$absolute_path($$OUT_PWD/../../src/debug)
CONFIG(release,debug|release): LIBDIR = $$absolute_path($$OUT_PWD/../../src/release) CONFIG(release,debug|release): LIBDIR = $$absolute_path($$OUT_PWD/../../src/release)
} else { } else {
CONFIG(debug,debug|release): LIBDIR = $$absolute_path($$OUT_PWD/../../debug) LIBDIR = $$absolute_path($$OUT_PWD/../../src)
CONFIG(release,debug|release): LIBDIR = $$absolute_path($$OUT_PWD/../../release)
} }
LIBS += -L$$LIBDIR -lnut LIBS += -L$$LIBDIR -lnut

View File

@ -117,29 +117,33 @@ void MainTest::mix()
FieldPhrase<QString> lastName("", ""); FieldPhrase<QString> lastName("", "");
FieldPhrase<QDate> birthDate("", ""); FieldPhrase<QDate> birthDate("", "");
select(id);
select(id | name | lastName); select(id | name | lastName);
// update((name = "john") | (lastName = "snow")); update((name = "john") & (lastName = "snow"));
insert(id = 0);
insert((id = 4) & (name = "john"));
order_by(id);
order_by(id | ~name);
} }
void MainTest::select(const PhraseList &ph) void MainTest::select(const PhraseList &ph)
{ {
QTEST_ASSERT(ph.data.count());
} }
void MainTest::where(const ConditionalPhrase &ph) void MainTest::where(const ConditionalPhrase &ph)
{ {
QTEST_ASSERT(ph.data);
} }
void MainTest::update(const AssignmentPhraseList &p) void MainTest::update(const AssignmentPhraseList &p)
{ {
QTEST_ASSERT(p.data.count());
} }
void MainTest::insert(const AssignmentPhraseList &p) void MainTest::insert(const AssignmentPhraseList &p)
{ {
QTEST_ASSERT(p.data.count());
} }
void MainTest::order_by(const PhraseList &ph) void MainTest::order_by(const PhraseList &ph)

View File

@ -30,6 +30,7 @@ private slots:
void boolean(); void boolean();
void datetime(); void datetime();
void extra(); void extra();
void mix();
private: private:
void select(const Nut::PhraseList &ph); void select(const Nut::PhraseList &ph);