diff options
author | Bill King <bill.king@nokia.com> | 2009-06-23 05:10:52 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-06-23 05:11:59 (GMT) |
commit | 3647de5291db9e359e7844f80202251f47e83a97 (patch) | |
tree | 619b822e49e5c999b229b241605779c950521f0f /tests/auto/qsqldatabase/tst_qsqldatabase.cpp | |
parent | a8eda447bbf87ebd4041c851022af389a0e388e0 (diff) | |
download | Qt-3647de5291db9e359e7844f80202251f47e83a97.zip Qt-3647de5291db9e359e7844f80202251f47e83a97.tar.gz Qt-3647de5291db9e359e7844f80202251f47e83a97.tar.bz2 |
Cleanup of db test cases.
Mostly cleanup of dropping of tables to a consistent place.
Also enable itemmodel tests.
Diffstat (limited to 'tests/auto/qsqldatabase/tst_qsqldatabase.cpp')
-rw-r--r-- | tests/auto/qsqldatabase/tst_qsqldatabase.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index cce4602..f697488 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -249,7 +249,7 @@ struct FieldDef { // excluding the primary key field static int createFieldTable(const FieldDef fieldDefs[], QSqlDatabase db) { - tst_Databases::safeDropTables(db, QStringList() << qTableName("qtestfields")); + tst_Databases::safeDropTable(db, qTableName("qtestfields")); QSqlQuery q(db); // construct a create table statement consisting of all fieldtypes QString qs = "create table " + qTableName("qtestfields"); @@ -357,6 +357,7 @@ void tst_QSqlDatabase::dropTestTables(QSqlDatabase db) tableNames << (qTableName("qtest") + " test"); tst_Databases::safeDropTables(db, tableNames); + tst_Databases::safeDropView(db, qTableName("qtest_view")); } void tst_QSqlDatabase::populateTestTables(QSqlDatabase db) @@ -540,11 +541,6 @@ void tst_QSqlDatabase::tables() QVERIFY(tables.contains(qTableName("temp_tab"), Qt::CaseInsensitive)); QVERIFY(tables.contains(qTableName("qtest"), Qt::CaseInsensitive)); - if (tst_Databases::isMSAccess(db)) - QSqlQuery("drop table " + qTableName("qtest_view"), db); - else - QSqlQuery("drop view " + qTableName("qtest_view"), db); - if (db.driverName().startsWith("QPSQL")) { QVERIFY(tables.contains(qTableName("qtest") + " test")); } |