summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativesqldatabase/data/error-creation.js
blob: 0ab2a3544fa52458a1d725554cb5c5dadab43672 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function test() {
    var r="transaction_not_finished";
    try {
        var db = openDatabaseSync("QmlTestDB-creation", "2.0", "Test database from Qt autotests", 1000000);
    } catch (err) {
        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;
}