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/qsqldriver | |
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/qsqldriver')
-rw-r--r-- | tests/auto/qsqldriver/tst_qsqldriver.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/auto/qsqldriver/tst_qsqldriver.cpp b/tests/auto/qsqldriver/tst_qsqldriver.cpp index bbd7483..d8f7747 100644 --- a/tests/auto/qsqldriver/tst_qsqldriver.cpp +++ b/tests/auto/qsqldriver/tst_qsqldriver.cpp @@ -85,9 +85,7 @@ void tst_QSqlDriver::recreateTestTables(QSqlDatabase db) { QSqlQuery q(db); - QStringList tableNames; - tableNames << qTableName( "relTEST1" ); - tst_Databases::safeDropTables( db, tableNames ); + tst_Databases::safeDropTable( db, qTableName( "relTEST1" ) ); QVERIFY_SQL( q, exec("create table " + qTableName("relTEST1") + " (id int not null primary key, name varchar(20), title_key int, another_title_key int)")); @@ -105,11 +103,9 @@ void tst_QSqlDriver::initTestCase() void tst_QSqlDriver::cleanupTestCase() { - QStringList tableNames; - tableNames << qTableName( "relTEST1" ); foreach (const QString &dbName, dbs.dbNames) { QSqlDatabase db = QSqlDatabase::database(dbName); - tst_Databases::safeDropTables( db, tableNames ); + tst_Databases::safeDropTable( db, qTableName( "relTEST1" ) ); } dbs.close(); } |