uCBQN/test/cmp.bqn

52 lines
1.7 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.

noerr•args
•Outnoerr "Not executing tests that would error"
fns =<>
n 0÷0
nn -n
arrs •internal.Squeeze¨
"hello","{⍉⍵}","{⍉𝕩}"
@+012126127
@+012126127128129
@+012655336553465535
"",0
123 ¯101 10 ¯5+10 11.5004π -11.5004π nnnnnnn(-02π)12500÷00350
¯128¯101127
¯32768¯10132767
¯2147483648¯1012147483647
¯2147483648¯1012147483648
63 (•MakeRand 2).Range 2
64 (•MakeRand 2).Range 2
65 (•MakeRand 2).Range 2
90 (•MakeRand 2).Range 2
atms 1¯10¯0¯∞nnn@'l''⍉''𝕩'{a1}+{𝔽}
atms - 1020
atms - (¯0.9¯0.100.10.9+2-5) + 235
atms @+12865536+2-5
LV •internal.ListVariations
V •internal.Variation
ElType •internal.ElType
NEas ((¨=˙) 8·ElType 2¨)/
•Out "AS"
{
fnarratm:
´(¨) {(𝕩 V arr) Fn"err" atm}¨ LV arr?0;
fnarratm:
•Out "Fail:"
•Show arr
•Show fn
•Show atm
•Show (LV arr){(𝕩 V arr) Fn"err" atm}¨ LV arr
•Exit 1
}¨ NEasnoerr (<)<´ fnsarrsatms
•Out "AA"
{
fnlr:
lr(´¨lr)¨lr
´(¨) {fn"err"˝𝕩 V¨ lr}¨ <´ LV¨lr?0;
𝕩!0
}¨ ((<)<´ fns 2< (0<¨)/arrs) (<)<´ fns 2<"" 0