summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsqlquery
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2010-03-25 06:50:32 (GMT)
committerBill King <bill.king@nokia.com>2010-03-25 06:50:32 (GMT)
commit92607e19c79fcdfb82e42fa45353004f85d1adf9 (patch)
tree40d3491a5316195ad3e76902879f2c6c6090c737 /tests/auto/qsqlquery
parent194bbeed0152d541527059bb0f1dae60a8573912 (diff)
downloadQt-92607e19c79fcdfb82e42fa45353004f85d1adf9.zip
Qt-92607e19c79fcdfb82e42fa45353004f85d1adf9.tar.gz
Qt-92607e19c79fcdfb82e42fa45353004f85d1adf9.tar.bz2
Sql Autotest cleanup and tweaking.
Diffstat (limited to 'tests/auto/qsqlquery')
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index b9ab73f..db3a929 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -1137,17 +1137,14 @@ void tst_QSqlQuery::last()
QVERIFY( q.last() );
- if ( !tst_Databases::isMSAccess( db ) )
- // Access doesn't return the correct position
- QCOMPARE( q.at(), ( i-1 ) );
+ QSet<int> validReturns(QSet<int>() << -1 << i-1);
+ QVERIFY( validReturns.contains(q.at()) );
QSqlQuery q2( "select * from " + qtest, db );
QVERIFY( q2.last() );
- if ( !tst_Databases::isMSAccess( db ) )
- // Access doesn't return the correct position
- QCOMPARE( q.at(), ( i-1 ) );
+ QVERIFY( validReturns.contains(q.at()) );
}
void tst_QSqlQuery::seek()