diff options
Diffstat (limited to 'ext/wasm/SQLTester')
-rw-r--r-- | ext/wasm/SQLTester/SQLTester.mjs | 14 | ||||
-rw-r--r-- | ext/wasm/SQLTester/SQLTester.run.mjs | 8 | ||||
-rw-r--r-- | ext/wasm/SQLTester/index.html | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/ext/wasm/SQLTester/SQLTester.mjs b/ext/wasm/SQLTester/SQLTester.mjs index f16d5a3a1..e76019694 100644 --- a/ext/wasm/SQLTester/SQLTester.mjs +++ b/ext/wasm/SQLTester/SQLTester.mjs @@ -13,8 +13,8 @@ ** implementation of the SQLTester framework. ** ** This version is not well-documented because it's a direct port of -** the Java immplementation, which is documented: in the main SQLite3 -** source tree, see ext/jni/src/org/sqlite/jni/tester/SQLite3Tester.java. +** the Java implementation, which is documented: in the main SQLite3 +** source tree, see ext/jni/src/org/sqlite/jni/capi/SQLTester.java. */ import sqlite3ApiInit from '/jswasm/sqlite3.mjs'; @@ -28,7 +28,7 @@ const log = (...args)=>{ /** Try to install vfsName as the new default VFS. Once this succeeds (returns true) then it becomes a no-op on future calls. Throws if - vfs registration as the default VFS fails but has no side effects + VFS registration as the default VFS fails but has no side effects if vfsName is not currently registered. */ const tryInstallVfs = function f(vfsName){ @@ -48,11 +48,10 @@ tryInstallVfs.vfsName = undefined; if( 0 && globalThis.WorkerGlobalScope ){ // Try OPFS storage, if available... - if( 0 && sqlite3.oo1.OpfsDb ){ + if( 1 && sqlite3.oo1.OpfsDb ){ /* Really slow with these tests */ tryInstallVfs("opfs"); - } - if( sqlite3.installOpfsSAHPoolVfs ){ + }else if( sqlite3.installOpfsSAHPoolVfs ){ await sqlite3.installOpfsSAHPoolVfs({ clearOnInit: true, initialCapacity: 15, @@ -207,6 +206,9 @@ const Util = newObj({ ['string','string']) })/*Util*/; +/** + Output logger utility. +*/ class Outer { #lnBuf = []; #verbosity = 0; diff --git a/ext/wasm/SQLTester/SQLTester.run.mjs b/ext/wasm/SQLTester/SQLTester.run.mjs index bba1437e5..bf20c2cee 100644 --- a/ext/wasm/SQLTester/SQLTester.run.mjs +++ b/ext/wasm/SQLTester/SQLTester.run.mjs @@ -9,7 +9,8 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** This file contains a test application for SQLTester.js. +** This file contains a test application for SQLTester.mjs. It loads +** test scripts and runs them through the SQLTester class. */ import {default as ns} from './SQLTester.mjs'; import {default as allTests} from './test-list.mjs'; @@ -33,7 +34,7 @@ const affirm = function(expr, msg){ } } -let ts = new ns.TestScript('/foo.test',` +let ts = new ns.TestScript('SQLTester-sanity-check.test',` /* ** This is a comment. There are many like it but this one is mine. ** @@ -93,6 +94,7 @@ SELECT json_array(1,2,3) select 1 as 'a', 2 as 'b'; --result 1 2 --close +--testcase the-end --print Until next time `); @@ -112,8 +114,6 @@ const runTests = function(){ ts.run(sqt); affirm( 'zilch' === sqt.nullValue() ); sqt.addTestScript(ts); - }else if(0){ - sqt.addTestScript(ts); }else{ for(const t of allTests){ sqt.addTestScript( new ns.TestScript(t) ); diff --git a/ext/wasm/SQLTester/index.html b/ext/wasm/SQLTester/index.html index 1dffad63e..2d85b9116 100644 --- a/ext/wasm/SQLTester/index.html +++ b/ext/wasm/SQLTester/index.html @@ -119,8 +119,6 @@ break; } }; - //runTests() - /* Inexplicably, */ })(); </script> </body> |