update tests
This commit is contained in:
parent
e5a9c7536d
commit
721a0e4a79
@ -9,13 +9,15 @@ test/moreCfgs.sh path/to/mlochbaum/BQN // run "2+2" in a bunch of configurations
|
|||||||
./BQN test/cmp.bqn // fuzz-test scalar comparison functions =≠<≤>≥
|
./BQN test/cmp.bqn // fuzz-test scalar comparison functions =≠<≤>≥
|
||||||
./BQN test/equal.bqn // fuzz-test 𝕨≡𝕩
|
./BQN test/equal.bqn // fuzz-test 𝕨≡𝕩
|
||||||
./BQN test/copy.bqn // fuzz-test creating new arrays with elements copied from another
|
./BQN test/copy.bqn // fuzz-test creating new arrays with elements copied from another
|
||||||
./BQN test/bitcpy.bqn // fuzz-test bit_cpy; requires a CBQN build with -DTEST_BITCPY
|
./BQN test/bitcpy.bqn // fuzz-test bit_cpy; requires -DTEST_BITCPY
|
||||||
./BQN test/mut.bqn // fuzz-test mut.h (currently just bitarr fill); requires a CBQN build with -DTEST_MUT
|
./BQN test/bit.bqn // fuzz-test •bit functions
|
||||||
|
./BQN test/mut.bqn // fuzz-test mut.h (currently just bitarr fill); requires -DTEST_MUT
|
||||||
./BQN test/hash.bqn // fuzz-test hashing
|
./BQN test/hash.bqn // fuzz-test hashing
|
||||||
./BQN test/squeezeValid.bqn // fuzz-test squeezing giving a correct result; requires a CBQN build with -DEEQUAL_NEGZERO
|
./BQN test/squeezeValid.bqn // fuzz-test squeezing giving a correct result; requires -DEEQUAL_NEGZERO
|
||||||
./BQN test/squeezeExact.bqn // fuzz-test squeezing giving the exact smallest result; requires a CBQN build with -DEEQUAL_NEGZERO
|
./BQN test/squeezeExact.bqn // fuzz-test squeezing giving the exact smallest result; requires -DEEQUAL_NEGZERO
|
||||||
./BQN test/various.bqn // tests for various small things
|
./BQN test/various.bqn // tests for various small things
|
||||||
./BQN test/random.bqn // test (•MakeRand n).Range
|
./BQN test/random.bqn // test (•MakeRand n).Range
|
||||||
|
./BQN test/joinReuse.bqn // test in-place join; requires -DPRINT_JOIN_REUSE
|
||||||
make -C test/ffi // test FFI functionality; expects both regular and shared library CBQN builds to already exist
|
make -C test/ffi // test FFI functionality; expects both regular and shared library CBQN builds to already exist
|
||||||
|
|
||||||
legacy utilities:
|
legacy utilities:
|
||||||
|
|||||||
@ -26,6 +26,7 @@ atms∾↩ @+⥊128‿65536+⌜2-↕5
|
|||||||
|
|
||||||
LV ← •internal.ListVariations
|
LV ← •internal.ListVariations
|
||||||
V ← •internal.Variation
|
V ← •internal.Variation
|
||||||
|
C ← •internal.ClearRefs
|
||||||
ElType ← •internal.ElType
|
ElType ← •internal.ElType
|
||||||
|
|
||||||
NEas ← ((⊑¨∊=‿≠˙) ∨ 8≠·ElType 2⊑¨⊢)⊸/
|
NEas ← ((⊑¨∊=‿≠˙) ∨ 8≠·ElType 2⊑¨⊢)⊸/
|
||||||
@ -33,7 +34,7 @@ NEas ← ((⊑¨∊=‿≠˙) ∨ 8≠·ElType 2⊑¨⊢)⊸/
|
|||||||
•Out "AS"
|
•Out "AS"
|
||||||
{
|
{
|
||||||
fn‿arr‿atm:
|
fn‿arr‿atm:
|
||||||
∧´(⊏≡¨⊢) {(𝕩 V arr) Fn⎊"err" atm}¨ LV arr?0;
|
C@ ⋄ ∧´(⊏≡¨⊢) {(𝕩 V arr) Fn⎊"err" atm}¨ LV arr?0;
|
||||||
fn‿arr‿atm:
|
fn‿arr‿atm:
|
||||||
•Out "Fail:"
|
•Out "Fail:"
|
||||||
•Show arr
|
•Show arr
|
||||||
@ -46,6 +47,7 @@ fn‿arr‿atm:
|
|||||||
•Out "AA"
|
•Out "AA"
|
||||||
{
|
{
|
||||||
fn‿l‿r:
|
fn‿l‿r:
|
||||||
|
C@
|
||||||
lr←(⌈´≠¨l‿r)↑¨l‿r
|
lr←(⌈´≠¨l‿r)↑¨l‿r
|
||||||
∧´(⊏≡¨⊢) {fn⎊"err"˝𝕩 V¨ lr}¨ ⥊≍○<⌜´ LV¨lr?0;
|
∧´(⊏≡¨⊢) {fn⎊"err"˝𝕩 V¨ lr}¨ ⥊≍○<⌜´ LV¨lr?0;
|
||||||
𝕩!0
|
𝕩!0
|
||||||
|
|||||||
@ -62,7 +62,7 @@ f ↩ "lib.so" •FFI ⟨"u64:i32","ident_u64",">u64" ⟩ ⋄ •Show F 12345
|
|||||||
f ↩ "lib.so" •FFI ⟨"u64:u1", "ident_u64",">u64:c8" ⟩ ⋄ •Show F "hellowor"
|
f ↩ "lib.so" •FFI ⟨"u64:u1", "ident_u64",">u64:c8" ⟩ ⋄ •Show F "hellowor"
|
||||||
|
|
||||||
Section "# malloc test"
|
Section "# malloc test"
|
||||||
f ↩ "lib.so" •FFI "*:i32"‿"malloc"‿">u64" ⋄ •Show (•internal.Info⋈≠) malloc ← F 123
|
f ↩ "lib.so" •FFI "*:i32"‿"malloc"‿">u64" ⋄ •Show (•internal.Type⋈≠) malloc ← F 123
|
||||||
f ↩ "lib.so" •FFI ""‿"free"‿">*:i32" ⋄ F malloc
|
f ↩ "lib.so" •FFI ""‿"free"‿">*:i32" ⋄ F malloc
|
||||||
|
|
||||||
Section "# pick item"
|
Section "# pick item"
|
||||||
|
|||||||
@ -79,7 +79,7 @@ ff7fdfefefdf7bb4 ff7fdfefefdf7bb4 fefffdfff7ffbffb bffff7fffdfffeff
|
|||||||
⟨ 0 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 ⟩
|
⟨ 0 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 0 ⟩
|
||||||
|
|
||||||
# malloc test
|
# malloc test
|
||||||
⟨ "fff7: refc:2 type:26=i32arr alloc:128" 2 ⟩
|
⟨ "i32arr" 2 ⟩
|
||||||
|
|
||||||
# pick item
|
# pick item
|
||||||
"hellowor"
|
"hellowor"
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
⟨V⇐Variation ⋄ LV⇐ListVariations⟩←•internal
|
⟨V⇐Variation ⋄ LV⇐ListVariations⟩←•internal
|
||||||
AllEq ← !¨ (<∘⊑≡¨⊢)
|
AllEq ← !¨ (<∘⊑≡¨⊢)
|
||||||
|
# all that's important in the output is that there are at least some "reuse:1"s and "reuse:0"s for each item; quoted errors the output are expected
|
||||||
# run with -DPRINT_JOIN_REUSE
|
|
||||||
# all that's important in the output is that there are at least some "reuse:1"s and "reuse:0"s for each item
|
|
||||||
|
|
||||||
{ w𝕊x:
|
{ w𝕊x:
|
||||||
•Out "next"
|
•Out "next"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user