fix test/random.bqn

⥊ is now too smart
This commit is contained in:
dzaima 2022-08-10 02:35:41 +03:00
parent a9b3b3de97
commit b39a725f4d

View File

@ -9,17 +9,16 @@ RB2 ← {¬⍟(R 2) "Ab" V 𝕩 R 1+R 2⋆R 10} # random boolean array with rand
rByteVals "Ai8"V {𝕩-256×𝕩>127} {{2×+˜´ 8/ 𝕩 •rand.Subset 8}¨ 9}¨20
RByte (R (rByteVals)˙)(rByteVals)
RH R¨RByte # store to a variable to randomize heap by 𝕨 values, each up to 𝕩 bytes
RH "Ai8"V¨ R¨RByte # store to a variable to randomize heap by 𝕨 values, each up to 𝕩 bytes
CH { # do "var CH↩" to a variable assigned to a result of RH
"heap corruption" ! ´2=Refc¨ 𝕩
"heap corruption" ! 1 Refc 𝕩
0
}
rByteVals {! "i8arr" TY 𝕩𝕨} 10 # ⥊ is dumb for now, but when it realizes that n⥊0 is a bitarr this'll need changing
OrScanBitarr {𝕊:
n 1 + R 2R 13
! (` `) "Ab" V {𝕊: 1((R n))𝕩}2 0˜ n
! (` `) "Ab" V {𝕊: 1((R n))𝕩}2 "Ai8" V 0˜ n
}¨
PlusScanBitarr {𝕊:
@ -62,10 +61,10 @@ Group ← {𝕊:
•Show "`bitarr" OrScanBitarr 100000
•Show "+`bitarr" PlusScanBitarr 100000
•Show "heap corruption of /bit" @0200 BitSlash 1000000
•Show "heap corruption of bit/i8" "Ai8"150 BitSlash 1000000
•Show "heap corruption of bit/i16" "Ai16"150 BitSlash 1000000
•Show "heap corruption of bit/i32" "Ai32"150 BitSlash 1000000
•Show "heap corruption test of /bit" @0200 BitSlash 1000000
•Show "heap corruption test of bit/i8" "Ai8"150 BitSlash 1000000
•Show "heap corruption test of bit/i16" "Ai16"150 BitSlash 1000000
•Show "heap corruption test of bit/i32" "Ai32"150 BitSlash 1000000
{
¬0 EEQ -0? •Out "Skipping tests requiring EEQUAL_NEGZERO";