uCBQN/test/cases/fuzz/select-cells.bqn

75 lines
2.1 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.

%DEF var V•internal.Variation LV•internal.ListVariations CLR•internal.ClearRefs
%DEF tvar %USE var _tvar {F _𝕣 x: (CLR@) {F 𝕩 V x}¨ LV 𝕩; w F _𝕣 x: (CLR@) (LV 𝕨) {(𝕨 V w) F 𝕩 V x} LV 𝕩}
%DEF eqvar _eqvar•args
%DEF eqvarv _eqvarv_•args
(
%USE eqvarv
Test { 𝕊:
x (2•rand.Range 50)•rand.Range 100
w {0: 0; (1+•rand.Range 50) •rand.Range 𝕩} 1x
w {𝕨˘ 𝕩}_eqvarv_"" x
}
Test¨ 1000
)
(
Test {𝕊 gen:
{ 𝕊 cam:
{
i •rand.Range3, ¯1-, {𝕩 - (1+2×𝕩) × 2•rand.Range˜𝕩} 𝕨 •rand.Range 𝕩
! (i˘ i•internal.Keep˘) Gen cam𝕩
}˜ 1(20)(2)16
}¨ 16100
}
Test {{0 + 𝕩 •rand.Range 100}}
Test {{0 + 𝕩 •rand.Range 1000}}
Test {{0 + 𝕩 •rand.Range 1e9}}
Test {{0 + 𝕩 •rand.Range 0}}
Test {{@ + 𝕩 •rand.Range 100}}
Test {{@ + 𝕩 •rand.Range 1000}}
Test {{@ + 𝕩 •rand.Range 1114111}}
Test {{"foo"@¨ 𝕩 •rand.Range 2}}
)
(
%USE var
F {𝕨˘ 𝕩}
{
𝕩+ 1
is 𝕨 •rand.Range 𝕩
n •rand.Range 200
d n𝕩•rand.Range 2
isn𝕩 ! 1= is F d, is F "Ai8"V d {𝕩=2? ("Ai8"V is) F d; }𝕩
}˜ 10
)
(
%USE var
F {𝕨˘ 𝕩}'e'
{
𝕩+ 1
𝕨+ 1
is 𝕨𝕩
n 1+•rand.Range 200
d n𝕩•rand.Range 2
𝕨𝕩n! ´ 'e'¨ is F d, is F "Ai8"V d {𝕩=2? ("Ai8"V is) F d; }𝕩
}˜ 10
)
(
%USE var
F {𝕨˘ 𝕩}'e'
{𝕊 inds:
csz inds
inds {
csz, 𝕨, 𝕩 ! 1= (V𝕨¨ (´𝕨1), "Ab" "Ai8") F V𝕩¨ "Ab""Ai8""Ai32"
} {𝕩csz •rand.Range 2}¨ (8)01+329
}¨ 22 {𝕩, •rand.Range˜𝕩}¨ 13458916
)