actually test for correctness
This commit is contained in:
parent
8e7f19a883
commit
445da5a659
@ -32,13 +32,13 @@
|
|||||||
%USE IS_HEAPVERIFY
|
%USE IS_HEAPVERIFY
|
||||||
# big ˝˘ & `˘ tester
|
# big ˝˘ & `˘ tester
|
||||||
_basicArgs ← { Test _𝕣 ranks:
|
_basicArgs ← { Test _𝕣 ranks:
|
||||||
{𝕊f: {{! f Test 0‿1⥊˜ 𝕩⊏0‿2‿4‿8‿32}¨ ↕𝕩⥊3 ⋄ 1}¨ ranks}¨ +‿∧‿∨‿=‿≠‿⊣‿⊢
|
{𝕊f: {{f Test 0‿1⥊˜ 𝕩⊏0‿2‿4‿8‿32}¨ ↕𝕩⥊3 ⋄ 1}¨ ranks}¨ +‿∧‿∨‿=‿≠‿⊣‿⊢
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO replace ○⊢ with some pureness-preserving •internal.Keep
|
# TODO replace ○⊢ with some pureness-preserving •internal.Keep
|
||||||
# w F _thing x tests F _thing⎉w x
|
# w F _thing x tests F _thing⎉w x
|
||||||
_testFoldCells ← {∨´𝕗=⊢‿⊣? 0=×´𝕨↓≢𝕩? 1; heapverify? 0=≠⥊𝕩? 1 ⊣ 𝔽˝⎉𝕨 𝕩; (𝔽˝⎉𝕨 ≡ 𝔽˝○⊢⎉𝕨) 𝕩}
|
_testFoldCells ← {∨´𝕗=⊢‿⊣? 0=×´(-𝕨)↑≢𝕩? 1; heapverify? 0=≠⥊𝕩? 1 ⊣ 𝔽˝⎉𝕨 𝕩; ! (𝔽˝⎉𝕨 ≡ 𝔽˝○⊢⎉𝕨) 𝕩}
|
||||||
_testScanCells ← { heapverify? 0=≠⥊𝕩? 1 ⊣ 𝔽`⎉𝕨 𝕩; (𝔽`⎉𝕨 ≡ 𝔽`○⊢⎉𝕨) 𝕩}
|
_testScanCells ← { heapverify? 0=≠⥊𝕩? 1 ⊣ 𝔽`⎉𝕨 𝕩; ! (𝔽`⎉𝕨 ≡ 𝔽`○⊢⎉𝕨) 𝕩}
|
||||||
|
|
||||||
{1 𝕨 _testFoldCells 𝕩} _basicArgs 2‿3‿4
|
{1 𝕨 _testFoldCells 𝕩} _basicArgs 2‿3‿4
|
||||||
{1 𝕨 _testScanCells 𝕩} _basicArgs 2‿3‿4
|
{1 𝕨 _testScanCells 𝕩} _basicArgs 2‿3‿4
|
||||||
@ -54,5 +54,5 @@
|
|||||||
cr 𝕎 _testFoldCells 𝕩
|
cr 𝕎 _testFoldCells 𝕩
|
||||||
cr 𝕎 _testScanCells 𝕩
|
cr 𝕎 _testScanCells 𝕩
|
||||||
}⌜ {0=×´sh? 𝕩; ∾⟨𝕩, ¬⌾⊑¨ 𝕩, ¬⌾(¯1⊑⥊)¨ 𝕩⟩} sh⊸⥊¨ 0‿1
|
}⌜ {0=×´sh? 𝕩; ∾⟨𝕩, ¬⌾⊑¨ 𝕩, ¬⌾(¯1⊑⥊)¨ 𝕩⟩} sh⊸⥊¨ 0‿1
|
||||||
}⌜ ⟨0, 1, 2, 8, 8‿1, 4‿8, 4‿2, 59, 60, 63, 80, 81, 200⟩
|
}⌜ ⟨0, 1, 2, 8, 8‿1, 4‿8, 4‿2, 59, 60, 63, 80, 81, 200, 640, 641⟩
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user