aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-06-30 19:30:58 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-06-30 19:31:21 -0400
commit723f6a92c6af9a46dfbd066fb18e014868bd6487 (patch)
tree685420c8757ecfe143b68cae8362b5a0acab3a93 /test
parent5cfbc5909bd33b5927f7b1fdb44944819563a385 (diff)
Tests for layer 4; fix ⚇ with non-matching depths
Diffstat (limited to 'test')
-rw-r--r--test/testref.bqn46
1 files changed, 35 insertions, 11 deletions
diff --git a/test/testref.bqn b/test/testref.bqn
index 066ca277..bedfbfe0 100644
--- a/test/testref.bqn
+++ b/test/testref.bqn
@@ -1,8 +1,7 @@
⍝ Tests of primitive functionality
⍝ Ordering matches the reference implementations
-•←/¬∾´⟨
-{⟨
+•←/¬⟨
⍝ LAYER 0
⍝ [0,34)
0≡¯2+2
@@ -39,9 +38,7 @@
⟨⟩≡↕0
⟨0⟩≡↕1
⟨0,1,2,3,4,5,6⟩≡↕7
-⟩⊣𝕩}⍟1 34⥊1
-{⟨
⍝ LAYER 1
⍝ [34,56)
3≡4>◶+‿-1
@@ -77,8 +74,6 @@
1≡¬0
2≡¬¯1
0≡3¬4
-⟩⊣𝕩}⍟1 32⥊1
-{⟨
2≡4¬3
4≡5¬2
0≡|0
@@ -118,9 +113,7 @@
(2⊸⊑≡⊢´)"a"‿2‿(3‿"d")
2(⊣≡⊢´)"a"‿2‿(3‿"d")
7‿10≡+¨´⟨⟨2,3⟩,⟨5,7⟩⟩
-⟩⊣𝕩}⍟1 38⥊1
-{⟨
⍝ LAYER 2
⍝ [104,117)
⟨⟩≡⟨⟩∾""
@@ -136,9 +129,7 @@
3(+¨≡+⌜)↕6
3‿4‿5‿6‿6≡{F:F⍟(×≡)⊸∾⟜⥊´𝕩}⟨2,1⟩+⟨⟨⟨⟨1,2⟩,3⟩,4⟩,5⟩
(=¨⟜(⥊⟜(↕×´)3‿4)≡(↕4)=⌜˜4|⊢)1‿6‿8
-⟩⊣𝕩}⍟1 13⥊1
-{⟨
⍝ LAYER 3
⍝ [117,152)
2≡⊑⟨2⟩
@@ -176,5 +167,38 @@
(1¨≡-○≡˜⟜↕¨)⟨0,⟨⟩,⟨1⟩,2,⟨3,4⟩⟩
2≡≡⟨5,⟨'c',+,2⟩⟩
0≡≡⊑⟨-⟩
-⟩⊣𝕩}⍟1 35⥊1
+
+ ⍝ LAYER 4
+ ⍝ [152,183)
+ ≡⟜><'a'
+ ≡⟜><∞
+ ≡⟜>↕5
+ ≡⟜>5‿3⥊2
+ 2‿3‿2≡≢>↕2‿3
+ ((4⥊2)⊸⥊≡(>2‿2⥊·<2‿2⥊⊢))"abcd"
+ (⊢≡>∘<)5‿3⥊↕15
+ (⊢≡(><¨))5‿3⥊↕15
+ (⥊≡≍)'a'
+ (⥊≡≍)<'a'
+ (1‿2⊸⥊≡≍)"ab"
+ 1‿2≡1≍2
+ 2‿1(≍≡2‿2⥊∾)4‿3
+ (≍⟜<≡≍˜)'a'
+ (≍˘˜⥊˘1‿5‿9)≡⌽⎉2⊸+⥊⟜(↕×´)3‿2‿1
+ (↕4)(×⌜≡×⎉0‿2)↕5
+ (↕4)(⋆˜⌜˜≡⋆⎉∞‿¯4)↕5
+ (⟨2⟩⊸∾⍟(2‿2⥊0‿1‿1‿1)2‿3)≡≢¨≍⎉(⌊○(≠≢))⌜˜⟨↕3,2‿3⥊↕6⟩
+ (2=⌜○↕3)≡(2‿4⥊"abc")≡⎉1(2‿3‿4⥊"abc")
+ ⟨0,0⟩≡(2‿4⥊"abc")≡⎉¯1(2‿3‿4⥊"abc")
+ ⟨5,⟨15,1⟩⟩≡+´⚇1⟨⟨3,2⟩,⟨⟨4,5,6⟩,⟨1⟩⟩⟩
+ 5‿6‿15≡∾´+´⚇1⟨⟨0,1⟩,⟨⟨⟩⟩⟩⥊⊸∾⚇¯2‿1⟨⟨2,3⟩,⟨4,5,6⟩⟩
+ 4≡2+⍟¯1 6
+ (2×↕7)≡2+⍟(¯3+↕7)6
+ (3⌊↕5)≡{i←0⋄r←{i+↩1⋄1+𝕩}⍟(↕4)𝕩⋄r∾i}0
+ (+⌜˜≡·>1+⍟⊢⊢)↕5
+ 0‿1‿3‿6‿10≡+`↕5
+ (-0‿1‿3‿6‿10)≡-`↕5
+ ((0∾¨↕3)≍3⥊0)≡≡`↕2‿3
+ ⟨⟩≡×`⟨⟩
+ ≡⟜(!∘0`)3‿0‿2⥊""