aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-08 09:25:07 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-08 09:25:52 -0400
commit4944dee972f9ac492f3e6afb8518465100b596e3 (patch)
treed1a86c64930838290e72751bdd1ac6969fab9f9e /test
parent9349cb822b44960aa6072063061ad49d00b73833 (diff)
Supppport trains in bytecode backend
Diffstat (limited to 'test')
-rw-r--r--test/bcases.bqn3
-rwxr-xr-xtest/bt7
2 files changed, 7 insertions, 3 deletions
diff --git a/test/bcases.bqn b/test/bcases.bqn
new file mode 100644
index 00000000..93388d41
--- /dev/null
+++ b/test/bcases.bqn
@@ -0,0 +1,3 @@
+-4 % (⌈-)4+÷2
+3 % √5(+×-)4
+1 % 4((¬=)∧¬=1+-)6
diff --git a/test/bt b/test/bt
index 4dc0ab21..a6b8eeb3 100755
--- a/test/bt
+++ b/test/bt
@@ -1,6 +1,7 @@
#! /usr/bin/env dbqn
dRun ← ⟨"dRun"⟩ •EX •path∾"../dcshim.bqn"
-c ← (¬"{"⊑∘∊⊢)¨⊸/ •LNS •path∾"cases.bqn"
-p ← '%' ⍎⊸≡⟜DRun´∘((+`-2⊸×)∘=⊔⊢)¨ c
-• ← "All passed!"⍟(0=≠) /¬p
+c ← (¬"{"⊑∘∊⊢)¨⊸/ ∾(•LNS •path∾∾⟜"cases.bqn")¨""‿"b"
+M ← {e‿b: (⍎e)⊸≢◶""‿{(•UCS 10)∾˜""""∾b∾""": expected "∾e∾" but received "∾𝕩} DRun b}
+r ← '%' M∘((+`-2⊸×)∘=⊔⊢)¨ c
+• ← "All passed!"⍟(0=≠) ∾r