diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-04-06 13:17:44 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-04-06 13:18:07 -0400 |
| commit | d621ab4a7a98ffd489ab6f5070c40a0b5e569743 (patch) | |
| tree | c9c773361fa073caef5ab76b1ae4e0a11084940d | |
| parent | aaa0de82d6d1b71c950438aa695dc02fb210b140 (diff) | |
Clean up interface from dz_wasm.js to wc.bqn
| -rwxr-xr-x | test/dz_wasm.js | 8 | ||||
| -rwxr-xr-x[-rw-r--r--] | wc.bqn | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/dz_wasm.js b/test/dz_wasm.js index 326cb16c..b1afa586 100755 --- a/test/dz_wasm.js +++ b/test/dz_wasm.js @@ -6,16 +6,16 @@ const execFile = require('child_process').execFile .exports.fn() const t=load('cases/simple.bqn').split('\n').filter(x=>x).map(x=>x.split(' % ')) - , test=t.map(e=>'"'+e[1]+'"').join('\n') + , test=t.map(e=> e[1]) , expt=t.map(e=>+e[0]) var compiler = execFile( __dirname+'/../wc.bqn', - [ '{•←WCompile𝕩}¨⟨'+test+'⟩' ], + test, function (error, stdout, stderr) { const rslt=stdout.split('\n').filter(a=>a.length) - .map(a=>runWasm(a.split("‿").map(n=>+n))) - , pass=rslt.map((r,i)=>r===expt[i]) + .map(a=>runWasm(a.split(" ").map(n=>+n))) + , pass=expt.map((e,i)=>e===rslt[i]) , fail=pass.map((p,i)=>p?-1:i).filter(i=>i>=0) console.log( fail.length @@ -86,4 +86,4 @@ WCompile←{ Gen ⟨(≠¨f)/(1‿2‿0≍¨1)⥊¨¨f64 ⋄ 2 ⋄ ∾f⟩ } -•Eval ⊑•args +•Out ∾((@+10)«·∾(" "∾⍕)¨)∘WCompile¨ •args |
