aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/tester1.c-pp.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/wasm/tester1.c-pp.js')
-rw-r--r--ext/wasm/tester1.c-pp.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/wasm/tester1.c-pp.js b/ext/wasm/tester1.c-pp.js
index 82dd73e23..8b80d4d88 100644
--- a/ext/wasm/tester1.c-pp.js
+++ b/ext/wasm/tester1.c-pp.js
@@ -1219,7 +1219,7 @@ self.sqlite3InitModule = sqlite3InitModule;
})
////////////////////////////////////////////////////////////////////
- .t('DB.Stmt', function(S){
+ .t('DB.Stmt', function(sqlite3){
let st = this.db.prepare(
new TextEncoder('utf-8').encode("select 3 as a")
);
@@ -1274,6 +1274,12 @@ self.sqlite3InitModule = sqlite3InitModule;
}
T.assert(!st.pointer)
.assert(0===this.db.openStatementCount());
+
+ T.mustThrowMatching(()=>new sqlite3.oo1.Stmt("hi"), function(err){
+ return (err instanceof sqlite3.SQLite3Error)
+ && capi.SQLITE_MISUSE === err.resultCode
+ && 0 < err.message.indexOf("Do not call the Stmt constructor directly.")
+ });
})
////////////////////////////////////////////////////////////////////////