aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-01 19:09:08 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-01 19:09:08 -0400
commit35b312299a40ac6fc1725901e99b62239be2e5c9 (patch)
tree6bb99ae4c4870ac4aee235a18a6967c8145ad0eb /test
parent01fe8ee5bbba4631b12290a6f50b5412b7aaf096 (diff)
Test layer 6 structural and search functions
Diffstat (limited to 'test')
-rw-r--r--test/testref.bqn49
1 files changed, 47 insertions, 2 deletions
diff --git a/test/testref.bqn b/test/testref.bqn
index 62758027..59313beb 100644
--- a/test/testref.bqn
+++ b/test/testref.bqn
@@ -1,8 +1,8 @@
⍝ Tests of primitive functionality
⍝ Ordering matches the reference implementations
-•←/¬⟨
- ⍝ LAYER 0
+•←/¬∾⟨
+⟨ ⍝ LAYER 0
⍝ [0,34)
0≡¯2+2
1e4≡5e3+5e3
@@ -251,4 +251,49 @@
3‿3‿3‿2‿2‿1≡/˜3‿2‿1
(≍1∾¨1‿2‿2)≡(↕¨/↕)2‿3
⟨⟩(/≡⊢)≍"ab"
+
+⟩
+⟨ ⍝ LAYER 6
+ ⍝ [230,270)
+ ≡⟜(∾⥊¨)"abc"
+ (∾´≡∾)"ab"‿"cde"‿""
+ 1‿2‿3‿4‿6‿9≡∾(⊢×≠↑↓)1+↕3
+ ≡⟜∾⟨⟩
+ ⟨1‿4,⥊2⟩((∾⋆⌜⌜)≡⋆⌜○∾)⟨2‿3‿4,⟨⟩,⥊5⟩
+ "abcd"≡"abc"∾'d'
+ "abcd"≡"abc"∾<'d'
+ (↕4‿3)≡(↕3‿3)∾3∾¨↕3
+ (∾˜≡·¯1⊸(×´∘↓∾↑)∘≢⊸⥊≍˜)2‿3⥊"abcdef"
+ (∾´≡∾)⟨3‿2‿1,0‿2‿1⟩⥊¨<↕6
+ ⟨1‿2,⥊0,⥊3⟩≡⊔1‿0‿0‿2
+ 4‿3‿2(≍○<≡·(≠¨≍○<∾)/⊸⊔)"abcdefghi"
+ ⟨⟩≡(3⥊¯1)⊔"abc"
+ (≍˘1‿1‿4<∘⥊⎉1 16‿4+⌜↕4)≡2↓⟨3‿2,¯1‿0‿¯1⟩⊔2‿3‿4⥊↕24
+ ⥊⚇0⊸≡○⊔⟜(⥊<)1‿2‿2‿¯1‿0
+ (⊔≡·≍⍟2∘<·∾⌜´/∘(0⊸=)¨)⟨0‿¯1‿0‿0,¯1‿0‿0⟩
+ 2‿0‿4≡"abcd"⊐"cae"
+ ⟨1⟩≡"abcd"⊐"b"
+ (<3)≡⊐⟜(3⊸⊏)"abcd"
+ (5⌊3+↕5)≡⊐⟜(3‿0‿0+⚇1⊢)↕5‿2‿1
+ 1‿0‿0‿1≡"acef"∊"adf"
+ (∊⟜(↕2)≡<⟜2)3⋆⌜○↕5
+ (<1)≡3‿4‿5∊4+⌜○↕3
+ ('0'≠"11010001")≡∊"abacbacd"
+ (↑⟜1≡⟜∊⥊⟜∞)9
+ (⥊⟜1≡∊∘↕)6
+ ≡⟜∊⟨⟩
+ ≡○∊⟜(≍˜˘)"abcadbba"
+ ≡⟜⍷⟨⟩
+ "ba"≡⍷"baa"
+ 0‿1‿0‿0≡"abc"⍷"aabcba"
+ (0‿1≍0‿0)≡(1‿2≍4‿5)⍷3‿3⥊↕9
+ (⌽¨≡⍉)↕2⥊3
+ ∧´⍉⊸≡¨⟨'a',<'a',"a","abc",""⟩
+ (↕4)(-˜⌜˜≡·⍉-⌜)↕3‿2
+ (2×↕3)≡0‿0⍉6+⌜○↕3
+ ⟨⟩(⍉≡⊢)<4
+ (2‿0‿1⥊⟨⟩)≡1‿2‿0‿1⍉↕↕4
+ 2‿0‿3‿1‿4≡⍋"bdace"
+ "edcba"≡∨"bdace"
+⟩