Add tests

This commit is contained in:
Dimitri Lozeve 2023-10-04 17:21:45 +02:00
parent e1fe03d236
commit b868903a81
2 changed files with 32 additions and 9 deletions

View file

@ -1,11 +1,5 @@
SaveNpy,LoadNpy•Import"npy.bqn"
a345•rand.Range 0
"testbqn.npy"SaveNpy a
bLoadNpy"testbqn.npy"
! ab
! ab
floatArr23•rand.Range 0
intArr50-˜23•rand.Range 100
uintArr23•rand.Range 100
@ -14,6 +8,23 @@ uintArr←2‿3•rand.Range 100
"test_int.npy"SaveNpy intArr
"test_uint.npy"SaveNpy uintArr
floatArrLoadNpy"test_float.npy"
intArrLoadNpy"test_int.npy"
uintArrLoadNpy"test_uint.npy"
! floatArrLoadNpy"test_float.npy"
! intArrLoadNpy"test_int.npy"
! uintArrLoadNpy"test_uint.npy"
# Supported dtypes
ref2340
! refLoadNpy"test<f8.npy"
! refLoadNpy"test<i4.npy"
! refLoadNpy"test<u4.npy"
# Unsupported dtypes, should raise an error
! LoadNpy1"test<f4.npy"
! LoadNpy1"test<i8.npy"
! LoadNpy1"test<u8.npy"
! LoadNpy1"test>f4.npy"
! LoadNpy1"test>f8.npy"
! LoadNpy1"test>i4.npy"
! LoadNpy1"test>i8.npy"
! LoadNpy1"test>u4.npy"
! LoadNpy1"test>u8.npy"