diff options
| -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 |
