summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/sql/tst_sql.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-19 07:45:10 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-19 07:45:10 (GMT)
commit27b0c833c18f6b98687937f427887da291184eec (patch)
tree8c7e18c3181f8dc37b357a3cc88b0978afbe3707 /tests/auto/declarative/sql/tst_sql.cpp
parent2b383690c17e1f0f58ad0061fda9d51ff4fe469a (diff)
downloadQt-27b0c833c18f6b98687937f427887da291184eec.zip
Qt-27b0c833c18f6b98687937f427887da291184eec.tar.gz
Qt-27b0c833c18f6b98687937f427887da291184eec.tar.bz2
Clean-up SQL tests to not be order-dependent
Add tests for new SQL APIs Remove some non-useful SQL API extensions.
Diffstat (limited to 'tests/auto/declarative/sql/tst_sql.cpp')
-rw-r--r--tests/auto/declarative/sql/tst_sql.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp
index ceab74b..b5f98e3 100644
--- a/tests/auto/declarative/sql/tst_sql.cpp
+++ b/tests/auto/declarative/sql/tst_sql.cpp
@@ -109,6 +109,7 @@ void tst_sql::initTestCase()
{
removeRecursive(dbDir());
QDir().mkpath(dbDir());
+
}
void tst_sql::cleanupTestCase()
@@ -137,16 +138,14 @@ void tst_sql::testQml_data()
QTest::addColumn<int>("databases"); // The number of databases that should have been created
QTest::addColumn<bool>("qmlextension"); // Things WebKit can't do
- QTest::newRow("creation") << "data/1-creation.js" << "passed" << 1 << false;
- QTest::newRow("creation-a") << "data/1a-creation.js" << "passed" << 1 << false;
- QTest::newRow("selection") << "data/2-selection.js" << "passed" << 1 << false;
- QTest::newRow("creation-b") << "data/1b-creation.js" << "passed" << 2 << false;
- QTest::newRow("selection-bindnames") << "data/2-selection-bindnames.js" << "passed" << 2 << true; // WebKit somehow breaks named parameters
- QTest::newRow("iteration-item-function") << "data/3-iteration-item-function.js" << "passed" << 2 << false;
- QTest::newRow("iteration-index") << "data/4-iteration-index.js" << "passed" << 2 << true; // Some HTML5 documents say to use rows by index, others by item() function
- QTest::newRow("iteration-iterator") << "data/5-iteration-iterator.js" << "passed" << 2 << true; // As with previous, WebKit doesn't give an array
- QTest::newRow("iteration-efficient") << "data/6-iteration-efficient.js" << "passed" << 2 << true; // It's very inefficient to find the total number of results, here is a solution
- QTest::newRow("error-a") << "data/7a-error.js" << "passed" << 2 << false;
+ // Each test should use a newly named DB to avoid inter-test dependencies
+ QTest::newRow("creation") << "data/creation.js" << "passed" << 1 << false;
+ QTest::newRow("creation-a") << "data/creation-a.js" << "passed" << 2 << false;
+ QTest::newRow("changeversion") << "data/changeversion.js" << "passed" << 3 << false;
+ QTest::newRow("selection") << "data/selection.js" << "passed" << 4 << false;
+ QTest::newRow("selection-bindnames") << "data/selection-bindnames.js" << "passed" << 5 << true;
+ QTest::newRow("iteration") << "data/iteration.js" << "passed" << 6 << false;
+ QTest::newRow("error-a") << "data/error-a.js" << "passed" << 7 << false;
}
void tst_sql::validateAgainstWebkit_data()
@@ -155,7 +154,7 @@ void tst_sql::validateAgainstWebkit_data()
QTest::addColumn<QString>("result"); // The required output from the js test() function
QTest::addColumn<int>("databases"); // The number of databases that should have been created
QTest::addColumn<bool>("qmlextension"); // Things WebKit can't do
- QTest::newRow("creation") << "data/1-creation.js" << "passed" << 1 << false;
+ QTest::newRow("creation") << "data/creation.js" << "passed" << 1 << false;
}
void tst_sql::validateAgainstWebkit()