diff options
author | Bill King <bill.king@nokia.com> | 2009-12-17 22:40:37 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-12-17 22:40:37 (GMT) |
commit | 12a4be8cfea62249fd44a1e0c60642972a48f17e (patch) | |
tree | 0764da60225c4405b96ee08dee0dce2a625a09ac /tests/auto/qsqldatabase/tst_qsqldatabase.cpp | |
parent | abdf1389c8f2602737abc202ab6219c8b04cfadf (diff) | |
download | Qt-12a4be8cfea62249fd44a1e0c60642972a48f17e.zip Qt-12a4be8cfea62249fd44a1e0c60642972a48f17e.tar.gz Qt-12a4be8cfea62249fd44a1e0c60642972a48f17e.tar.bz2 |
Cleanup qsqldatabase test case a little bit.
Diffstat (limited to 'tests/auto/qsqldatabase/tst_qsqldatabase.cpp')
-rw-r--r-- | tests/auto/qsqldatabase/tst_qsqldatabase.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index 4f89708..13cb3be 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -768,9 +768,7 @@ void tst_QSqlDatabase::checkValues(const FieldDef fieldDefs[], QSqlDatabase db) rec->setValue(fieldDefs[ i ].fieldName(), fieldDefs[ i ].val); // qDebug(QString("inserting %1 into %2").arg(fieldDefs[ i ].val.toString()).arg(fieldDefs[ i ].fieldName())); } - if (!cur.insert()) { - QFAIL(QString("Couldn't insert record: %1 %2").arg(cur.lastError().databaseText()).arg(cur.lastError().driverText())); - } + QVERIFY_SQL(cur, insert()); cur.setForwardOnly(true); QVERIFY_SQL(cur, select("id = " + QString::number(pkey - 1))); QVERIFY_SQL(cur, next()); @@ -833,9 +831,7 @@ void tst_QSqlDatabase::checkNullValues(const FieldDef fieldDefs[], QSqlDatabase else rec->setValue(fieldDefs[ i ].fieldName(), fieldDefs[ i ].val); } - if (!cur.insert()) { - QFAIL(QString("Couldn't insert record: %1 %2").arg(cur.lastError().databaseText()).arg(cur.lastError().driverText())); - } + QVERIFY_SQL(cur, insert()); cur.setForwardOnly(true); QVERIFY_SQL(cur, select("id = " + QString::number(pkey - 1))); QVERIFY_SQL(cur, next()); @@ -937,20 +933,18 @@ void tst_QSqlDatabase::recordOCI() FieldDef("nvarchar2(20)", QVariant::String, QString("blah4")), FieldDef("number(10,5)", QVariant::Double, 1.1234567), FieldDef("date", QVariant::DateTime, dt), -#ifdef QT3_SUPPORT -//X? FieldDef("long raw", QVariant::ByteArray, QByteArray(Q3CString("blah5"))), - FieldDef("raw(2000)", QVariant::ByteArray, QByteArray(Q3CString("blah6")), false), - FieldDef("blob", QVariant::ByteArray, QByteArray(Q3CString("blah7"))), -#endif + FieldDef("long raw", QVariant::ByteArray, QByteArray("blah5")), + FieldDef("raw(2000)", QVariant::ByteArray, QByteArray("blah6"), false), + FieldDef("blob", QVariant::ByteArray, QByteArray("blah7")), FieldDef("clob", QVariant::String, QString("blah8")), FieldDef("nclob", QVariant::String, QString("blah9")), FieldDef("bfile", QVariant::ByteArray, QByteArray("blah10")), intytm, - intdts, - tsdef, - tstzdef, - tsltzdef, +// intdts, +// tsdef, +// tstzdef, +// tsltzdef, FieldDef() }; |