From d621ab4a7a98ffd489ab6f5070c40a0b5e569743 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Tue, 6 Apr 2021 13:17:44 -0400 Subject: Clean up interface from dz_wasm.js to wc.bqn --- test/dz_wasm.js | 8 ++++---- wc.bqn | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 wc.bqn 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 diff --git a/wc.bqn b/wc.bqn old mode 100644 new mode 100755 index 00d6da13..ab4d6af6 --- a/wc.bqn +++ b/wc.bqn @@ -86,4 +86,4 @@ WCompile←{ Gen ⟨(≠¨f)/(1‿2‿0≍¨1)⥊¨¨f64 ⋄ 2 ⋄ ∾f⟩ } -•Eval ⊑•args +•Out ∾((@+10)«·∾(" "∾⍕)¨)∘WCompile¨ •args -- cgit v1.2.3