testing of ˝˘ & `˘
This commit is contained in:
parent
024ab669d5
commit
8d5efa72f0
@ -27,3 +27,31 @@
|
||||
%USE tcc ⋄ ⟨⊏⟩ {𝕎 _tcc 𝕩}⌜ ⟨4‿5⥊↕20, 4‿5‿6⥊↕120, 2‿3‿4‿5⥊↕120⟩
|
||||
%USE tcc ⋄ ⊏_tcc 4‿2⥊↕8 ⋄ 1⊏_tcc 4‿2⥊↕8 ⋄ ⊏_tcc ↕4‿2 ⋄ 1⊏_tcc ↕4‿2
|
||||
%USE tcc ⋄ ⊑_tcc 4‿2⥊↕8 ⋄ 1⊑_tcc 4‿2⥊↕8 ⋄ ⊑_tcc ↕4‿2 ⋄ 1⊑_tcc ↕4‿2
|
||||
|
||||
(
|
||||
# big ˝˘ & `˘ tester
|
||||
_basicArgs ← { Test _𝕣 ranks:
|
||||
{𝕊f: {{! f Test 0‿1⥊˜ 𝕩⊏0‿2‿4‿8‿32}¨ ↕𝕩⥊3 ⋄ 1}¨ ranks}¨ +‿∧‿∨‿=‿≠‿⊣‿⊢
|
||||
}
|
||||
|
||||
# TODO replace ○⊢ with some pureness-preserving •internal.Keep
|
||||
# w F _thing x tests F _thing⎉w x
|
||||
_testFoldCells ← {∨´𝕗=⊢‿⊣? 0=×´𝕨↓≢𝕩? 1; (𝔽˝⎉𝕨 ≡ 𝔽˝○⊢⎉𝕨) 𝕩}
|
||||
_testScanCells ← { (𝔽`⎉𝕨 ≡ 𝔽`○⊢⎉𝕨) 𝕩}
|
||||
|
||||
{1 𝕨 _testFoldCells 𝕩} _basicArgs 2‿3‿4
|
||||
{1 𝕨 _testScanCells 𝕩} _basicArgs 2‿3‿4
|
||||
{2 𝕨 _testScanCells 𝕩} _basicArgs 3‿4
|
||||
{2 𝕨 _testScanCells 𝕩} _basicArgs 3‿4
|
||||
|
||||
|
||||
⟨0, 0‿1, 1‿0, 1, 10, 10‿1, 1‿10, 100⟩ {
|
||||
𝕨‿𝕩 ⥊¨↩
|
||||
sh ← 𝕨∾𝕩
|
||||
cr ← ≠𝕩
|
||||
+‿∧‿∨‿=‿≠‿⊣‿⊢ {
|
||||
cr 𝕎 _testFoldCells 𝕩
|
||||
cr 𝕎 _testScanCells 𝕩
|
||||
}⌜ {0=×´sh? 𝕩; ∾⟨𝕩, ¬⌾⊑¨ 𝕩, ¬⌾(¯1⊑⥊)¨ 𝕩⟩} sh⊸⥊¨ 0‿1
|
||||
}⌜ ⟨0, 1, 2, 8, 8‿1, 4‿8, 4‿2, 59, 60, 63, 80, 81, 200⟩
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user