summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsqlrelationaltablemodel
diff options
context:
space:
mode:
authorBill King <bking@trolltech.com>2009-07-10 02:12:45 (GMT)
committerBill King <bking@trolltech.com>2009-07-10 02:12:45 (GMT)
commit0d156972b868c951fa33f21735040ab1e7a76f21 (patch)
treeedf0911755c3fbe38be87c7a9fe85f6b1e209584 /tests/auto/qsqlrelationaltablemodel
parenta21230152c4ea8cd2e641f436230e76a835384c2 (diff)
downloadQt-0d156972b868c951fa33f21735040ab1e7a76f21.zip
Qt-0d156972b868c951fa33f21735040ab1e7a76f21.tar.gz
Qt-0d156972b868c951fa33f21735040ab1e7a76f21.tar.bz2
Get more sql autotests passing or expect-failing.
Diffstat (limited to 'tests/auto/qsqlrelationaltablemodel')
-rw-r--r--tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
index d934b35..1e23d3d 100644
--- a/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
+++ b/tests/auto/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp
@@ -145,8 +145,17 @@ void tst_QSqlRelationalTableModel::recreateTestTables(QSqlDatabase db)
void tst_QSqlRelationalTableModel::initTestCase()
{
- foreach (const QString &dbname, dbs.dbNames)
- recreateTestTables(QSqlDatabase::database(dbname));
+ foreach (const QString &dbname, dbs.dbNames) {
+ QSqlDatabase db=QSqlDatabase::database(dbname);
+ if (db.driverName().startsWith("QIBASE"))
+ db.exec("SET DIALECT 3");
+ else if (tst_Databases::isSqlServer(db)) {
+ QSqlQuery q(db);
+ QVERIFY_SQL(q, exec("SET ANSI_DEFAULTS ON"));
+ QVERIFY_SQL(q, exec("SET IMPLICIT_TRANSACTIONS OFF"));
+ }
+ recreateTestTables(db);
+ }
}
void tst_QSqlRelationalTableModel::cleanupTestCase()
@@ -490,6 +499,7 @@ void tst_QSqlRelationalTableModel::insertWithStrategies()
model.setTable(qTableName("reltest1"));
model.setRelation(2, QSqlRelation(qTableName("reltest2"), "tid", "title"));
+ model.setSort(0, Qt::AscendingOrder);
if (!db.driverName().startsWith("QTDS"))
model.setRelation(3, QSqlRelation(qTableName("reltest2"), "tid", "title"));
@@ -914,8 +924,8 @@ void tst_QSqlRelationalTableModel::casing()
QSqlDatabase db = QSqlDatabase::database(dbName);
CHECK_DATABASE(db);
- if (db.driverName().startsWith("QSQLITE"))
- QSKIP("The casing test for SQLITE is irrelevant since SQLITE is case insensitive", SkipAll);
+ if (db.driverName().startsWith("QSQLITE") || db.driverName().startsWith("QIBASE") || tst_Databases::isSqlServer(db))
+ QSKIP("The casing test for this database is irrelevant since this database does not treat different cases as separate entities", SkipAll);
QSqlQuery q(db);
QVERIFY_SQL( q, exec("create table " + qTableName("CASETEST1", db.driver()).toUpper() +