summaryrefslogtreecommitdiffstats
path: root/tests/auto/q3sqlcursor
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-08-03 14:21:06 +1000
committerBill King <bill.king@nokia.com>2009-08-03 14:21:06 +1000
commitf083e9c9aa59790695136811181f5f455d1c9dad (patch)
treee593b57b028fef218ee6344fc667131dc2e1f103 /tests/auto/q3sqlcursor
parent9c45d4daab2196b6418e7fb2be70f9e6d7a57799 (diff)
Fix more database autotests.
Diffstat (limited to 'tests/auto/q3sqlcursor')
-rw-r--r--tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp b/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
index 360c3b74e1..c449140a1f 100644
--- a/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
+++ b/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
@@ -546,7 +546,7 @@ void tst_Q3SqlCursor::unicode()
else
QFAIL( QString( "Strings differ at position %1: orig: %2, db: %3" ).arg( i ).arg( utf8str[ i ].unicode(), 0, 16 ).arg( res[ i ].unicode(), 0, 16 ) );
}
- if(db.driverName().startsWith("QMYSQL") || db.driverName().startsWith("QDB2"))
+ if((db.driverName().startsWith("QMYSQL") || db.driverName().startsWith("QDB2")) && res != utf8str)
QEXPECT_FAIL("", "See above message", Continue);
QVERIFY( res == utf8str );
}
@@ -722,7 +722,9 @@ void tst_Q3SqlCursor::updateNoPK()
// Sqlite returns 2, don't ask why.
QVERIFY(cur.update() != 0);
QString expect = "update " + qTableName("qtestPK") +
- " set id = 1 , name = NULL , num = NULL where " + qTableName("qtestPK") + ".id"
+ " set "+db.driver()->escapeIdentifier("id", QSqlDriver::FieldName)+" = 1 , "
+ +db.driver()->escapeIdentifier("name", QSqlDriver::FieldName)+" = NULL , "
+ +db.driver()->escapeIdentifier("num", QSqlDriver::FieldName)+" = NULL where " + qTableName("qtestPK") + ".id"
" IS NULL and " + qTableName("qtestPK") + ".name IS NULL and " +
qTableName("qtestPK") + ".num IS NULL";
if (!db.driver()->hasFeature(QSqlDriver::PreparedQueries)) {