diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-08-13 13:30:40 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-08-13 13:30:40 -0400 |
| commit | 6092a1fe08bdd8765e6840370518eb4f426d9323 (patch) | |
| tree | d42e1afb2d7f2fd585d2d6dc177230efd8be4b40 /test | |
| parent | 28573f0dbc2338a2a7f29de0f8a9a9d531d6d29a (diff) | |
Remove BQN2NGN-based code
Diffstat (limited to 'test')
| -rwxr-xr-x | test/nt.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/test/nt.js b/test/nt.js deleted file mode 100755 index 6024496f..00000000 --- a/test/nt.js +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env node - -const bqn=require(require('os').homedir+'/bin/bqn') - , load=f=>require('fs').readFileSync(__dirname+'/'+f,'utf8') - , runWasm=w=>new WebAssembly.Instance(new WebAssembly.Module(Uint8Array.from(w))) - .exports.fn() - -const t=load('cases.bqn').split('\n').filter(x=>x).map(x=>x.split(' % ')) - , test=t.map(e=>'"'+e[1]+'"').join('\n') - , expt=t.map(e=>+e[0]) - , rslt=bqn(load('../nc.bqn','utf8').concat('Compile¨⟨'+test+'⟩')) - .a.map((a,i)=>runWasm(a.a)) - , pass=rslt.map((r,i)=>r===expt[i]) - , fail=pass.map((p,i)=>p?-1:i).filter(i=>i>=0) -console.log( - fail.length - ? fail.map(i=>'"'+t[i][1]+'": expected '+expt[i]+' but received '+rslt[i]) - : "All passed!" -) -process.exit(+(fail.length>0)) |
