summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-10-28 08:05:11 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-10-28 08:05:11 (GMT)
commit30d8810bfab9c8157f80e5e38beda1ad8c0acfb0 (patch)
treea795aed64424cbd075f6c65440c7634aa0f3aa80 /tests/auto
parentc25bface8e20b472d1e50a82fdd85f7cda001f7e (diff)
parent5746e2ec47f1186e928830b58833756ac25156f4 (diff)
downloadQt-30d8810bfab9c8157f80e5e38beda1ad8c0acfb0.zip
Qt-30d8810bfab9c8157f80e5e38beda1ad8c0acfb0.tar.gz
Qt-30d8810bfab9c8157f80e5e38beda1ad8c0acfb0.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/sql/data/4-iteration-index.js27
-rw-r--r--tests/auto/declarative/sql/tst_sql.cpp2
2 files changed, 28 insertions, 1 deletions
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;
+}
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"));
}