uCBQN/test/equal.bqn
2022-04-04 21:38:35 +03:00

39 lines
1.0 KiB
BQN
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# make o3n-singeli && ./BQN test/equal.bqn
ListVariations, ClearRefs, Variation, Squeeze, Info •internal
u 100×(•UnixTime+1|100וMonoTime)@
# u ↩ 123
r •MakeRand •Show u
TestVars { w𝕊ab:
n ¬w
(ListVariations a) {
¬n (𝕨 Variation a) (𝕩 Variation b)? @;
•Out "fail for "𝕨"/"𝕩", expected "(w"0""1")":"
•Out •Repr a
•Out •Repr b
•Out •Repr ab
•Exit 1
} ListVariations b
ClearRefs@
}
(1 TestVars ˜)¨ "" 0
RandVals r •Import "utils.bqn"
Do { 𝕊:
at r.Range 8
l 1 + r.Range (at=0)100700
a l RandVals at
(1{𝕊:´a=a} at=4) TestVars aa
{ 𝕊:
p r.Range l
v 1 RandVals r.Range5 5+r.Range3 at5
exp v = pa
b Squeeze v(p) a
(exp{𝕊:´a=b} at=4) TestVars ab
}@100 @
}
@Do1000 @