From 1f68fba91cf60103dd118dbd0d78342526bac593 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 28 Oct 2009 17:07:18 +1000 Subject: Mac-safe sanity check. QT-2398 fix --- tests/auto/declarative/sql/tst_sql.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp index 22e9ba4..0ebdccd 100644 --- a/tests/auto/declarative/sql/tst_sql.cpp +++ b/tests/auto/declarative/sql/tst_sql.cpp @@ -86,7 +86,7 @@ QString tst_sql::dbDir() const void tst_sql::checkDatabasePath() { // Check default storage path (we can't use it since we don't want to mess with user's data) - QVERIFY(engine->offlineStoragePath().contains("Nokia")); + QVERIFY(engine->offlineStoragePath().contains("tst_sql")); QVERIFY(engine->offlineStoragePath().contains("OfflineStorage")); } -- cgit v0.12 From 5746e2ec47f1186e928830b58833756ac25156f4 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 28 Oct 2009 17:45:31 +1000 Subject: missing commit --- .../auto/declarative/sql/data/4-iteration-index.js | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/auto/declarative/sql/data/4-iteration-index.js diff --git a/tests/auto/declarative/sql/data/4-iteration-index.js b/tests/auto/declarative/sql/data/4-iteration-index.js new file mode 100644 index 0000000..298737d --- /dev/null +++ b/tests/auto/declarative/sql/data/4-iteration-index.js @@ -0,0 +1,27 @@ +var db = openDatabase("QmlTestDB", "", "Test database from Qt autotests", 1000000); +var r=0; + +db.transaction( + function(tx) { + tx.executeSql('SELECT * FROM Greeting', [], + function(tx, rs) { + var r1="" + for(var i = 0; i < rs.rows.length; i++) { + r1 += rs.rows[i].salutation + ", " + rs.rows[i].salutee + ";" + } + if (r1 != "hello, world;hello, world;hello, world;hello, world;") + r = "SELECTED DATA WRONG: "+r1; + }, + function(tx, error) { if (r==0) r="SELECT FAILED: "+error.message } + ); + }, + function(tx, error) { if (r==0) r="TRANSACTION FAILED: "+error.message }, + function(tx, result) { if (r==0) r="passed" } +); + + +function test() +{ + if (r == 0) r = "transaction_not_finished"; + return r; +} -- cgit v0.12