diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-23 09:57:22 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-23 09:57:22 (GMT) |
commit | 3acb3c64cbdf538bde2299a0343e8ba250516901 (patch) | |
tree | 05392556f80735701a0b75065b9efb0795465ed0 /tests | |
parent | 67ad0519fd165acee4a4d2a94fa502e9e4847bd0 (diff) | |
parent | e5fcad302d86d316390c6b0f62759a067313e8a9 (diff) | |
download | Qt-3acb3c64cbdf538bde2299a0343e8ba250516901.zip Qt-3acb3c64cbdf538bde2299a0343e8ba250516901.tar.gz Qt-3acb3c64cbdf538bde2299a0343e8ba250516901.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qreadwritelock/tst_qreadwritelock.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qsqldatabase/tst_qsqldatabase.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/qreadwritelock/tst_qreadwritelock.cpp index 3cb57dd..5b2a9a9 100644 --- a/tests/auto/qreadwritelock/tst_qreadwritelock.cpp +++ b/tests/auto/qreadwritelock/tst_qreadwritelock.cpp @@ -943,10 +943,10 @@ void tst_QReadWriteLock::uncontendedLocks() } } - printf("during %d millisecs:\n", millisecs); - printf("counted to %u\n", count); - printf("%u uncontended read locks/unlocks\n", read); - printf("%u uncontended write locks/unlocks\n", write); + qDebug("during %d millisecs:", millisecs); + qDebug("counted to %u", count); + qDebug("%u uncontended read locks/unlocks", read); + qDebug("%u uncontended write locks/unlocks", write); } enum { RecursiveLockCount = 10 }; diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index 25de429..349db65 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -307,7 +307,7 @@ void tst_QSqlDatabase::createTestTables(QSqlDatabase db) + db.driver()->escapeIdentifier(qTableName("qtest") + " test", QSqlDriver::TableName) + '(' + db.driver()->escapeIdentifier(QLatin1String("test test"), QSqlDriver::FieldName) - + " int primary key)"; + + " int not null primary key)"; QVERIFY_SQL(q, exec(qry)); } } diff --git a/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp index 6736a44..63202f8 100644 --- a/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp +++ b/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp @@ -182,7 +182,7 @@ void tst_QSqlQueryModel::populateTestTables(QSqlDatabase db) QVERIFY_SQL(q, exec(QString("insert into " + qTableName("test3") + " values(0)"))); QVERIFY_SQL(q, prepare("insert into "+qTableName("test3")+"(id) select id + ? from "+qTableName("test3tmp"))); for (int i=1; i<260; i*=2) { - QVERIFY_SQL(q2, exec("delete from "+qTableName("test3tmp"))); + q2.exec("delete from "+qTableName("test3tmp")); QVERIFY_SQL(q2, exec("insert into "+qTableName("test3tmp")+"(id) select id from "+qTableName("test3"))); q.bindValue(0, i); QVERIFY_SQL(q, exec()); @@ -191,7 +191,7 @@ void tst_QSqlQueryModel::populateTestTables(QSqlDatabase db) QVERIFY_SQL(q, exec(QString("insert into " + qTableName("many") + "(id, name) values (0, \'harry\')"))); QVERIFY_SQL(q, prepare("insert into "+qTableName("many")+"(id, name) select id + ?, name from "+qTableName("manytmp"))); for (int i=1; i < 2048; i*=2) { - QVERIFY_SQL(q2, exec("delete from "+qTableName("manytmp"))); + q2.exec("delete from "+qTableName("manytmp")); QVERIFY_SQL(q2, exec("insert into "+qTableName("manytmp")+"(id, name) select id, name from "+qTableName("many"))); q.bindValue(0, i); QVERIFY_SQL(q, exec()); @@ -368,7 +368,7 @@ void tst_QSqlQueryModel::insertColumn() QCOMPARE(model.indexInQuery(model.index(0, 5)).column(), -1); QCOMPARE(model.indexInQuery(model.index(0, 6)).column(), -1); - bool isToUpper = db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI"); + bool isToUpper = db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2"); QCOMPARE(model.record().field(0).name(), QString()); QCOMPARE(model.record().field(1).name(), isToUpper ? QString("ID") : QString("id")); QCOMPARE(model.record().field(2).name(), QString()); @@ -389,7 +389,7 @@ void tst_QSqlQueryModel::record() QSqlRecord rec = model.record(); - bool isToUpper = db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI"); + bool isToUpper = db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2"); QCOMPARE(rec.count(), 3); QCOMPARE(rec.fieldName(0), isToUpper ? QString("ID") : QString("id")); @@ -433,7 +433,7 @@ void tst_QSqlQueryModel::setHeaderData() model.setQuery(QSqlQuery("select * from " + qTableName("test"), db)); - bool isToUpper = db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI"); + bool isToUpper = db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2"); QCOMPARE(model.headerData(0, Qt::Horizontal).toString(), isToUpper ? QString("ID") : QString("id")); QCOMPARE(model.headerData(1, Qt::Horizontal).toString(), isToUpper ? QString("NAME") : QString("name")); QCOMPARE(model.headerData(2, Qt::Horizontal).toString(), QString("bar")); |