diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-03-29 06:27:48 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-03-29 06:27:48 (GMT) |
commit | 873a09f26963bd49cdae3cdf5e0d1229c945862f (patch) | |
tree | 0118041053f0911394b2e906ddca7452091204c1 /tests | |
parent | 28bd5d733ba1b0eedd3fff24ad42ab0e5e87a2e6 (diff) | |
download | Qt-873a09f26963bd49cdae3cdf5e0d1229c945862f.zip Qt-873a09f26963bd49cdae3cdf5e0d1229c945862f.tar.gz Qt-873a09f26963bd49cdae3cdf5e0d1229c945862f.tar.bz2 |
test error code too
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/sql/data/error-creation.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/declarative/sql/data/error-creation.js b/tests/auto/declarative/sql/data/error-creation.js index 92245fd..0ab2a35 100644 --- a/tests/auto/declarative/sql/data/error-creation.js +++ b/tests/auto/declarative/sql/data/error-creation.js @@ -3,10 +3,12 @@ function test() { try { var db = openDatabaseSync("QmlTestDB-creation", "2.0", "Test database from Qt autotests", 1000000); } catch (err) { - if (err.message == "SQL: database version mismatch") - r = "passed"; - else + if (err.code != SQLException.VERSION_ERR) + r = "WRONG ERROR CODE="+err.code; + else if (err.message != "SQL: database version mismatch") r = "WRONG ERROR="+err.message; + else + r = "passed"; } return r; } |