diff options
Diffstat (limited to 'tests/auto/declarative/sql/data/error-creation.js')
-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; } |