uCBQN/test
2023-05-22 11:40:37 +03:00
..
cases fix 𝕨∾𝕩 reuse logic 2023-05-22 11:40:37 +03:00
ffi static library 2023-05-21 23:47:40 +03:00
generated testing setup for ˘ & ⎉ 2023-04-24 19:43:04 +03:00
bit.bqn Add •bit op fuzz tests 2022-10-17 09:39:38 -04:00
bitcpy.bqn default to •internal.EEqual comparing 0 and ¯0 as equal 2023-04-02 15:29:11 +03:00
cells.bqn update heapverify detection in test/cells.bqn 2023-05-19 13:12:48 +03:00
cmp.bqn update tests 2022-11-17 18:56:46 +02:00
copy.bqn randomize shape a bit in test/copy.bqn 2022-04-25 03:13:58 +03:00
equal.bqn fix generic squeeze case 2022-04-04 21:38:35 +03:00
hash.bqn wyhash microoptimization 2022-08-05 03:08:39 +03:00
joinReuse.bqn update tests 2022-11-17 18:56:46 +02:00
mainCfgs.sh test native compiler in moreCfgs.sh 2023-01-30 23:43:48 +02:00
moreCfgs.sh more test rearrangement 2023-05-17 17:07:39 +03:00
mut.bqn fix test/mut.bqn leaking references 2022-11-17 18:56:46 +02:00
precompiled.bqn fix test/precompiled.bqn once more 2022-11-24 01:32:08 +02:00
random.bqn slightly more random test coverage 2022-08-17 19:35:41 +03:00
README.md test system 2023-05-21 16:51:42 +03:00
readTests.bqn add argument descriptions to test/readTests.bqn 2022-06-04 02:25:18 +03:00
run.bqn test system 2023-05-21 16:51:42 +03:00
squeezeExact.bqn NEON squeeze 2023-01-25 02:22:53 +02:00
squeezeValid.bqn default to •internal.EEqual comparing 0 and ¯0 as equal 2023-04-02 15:29:11 +03:00
utils.bqn default to •internal.EEqual comparing 0 and ¯0 as equal 2023-04-02 15:29:11 +03:00
various.bqn default to •internal.EEqual comparing 0 and ¯0 as equal 2023-04-02 15:29:11 +03:00
x86Cfgs.sh move all targets to build.bqn with Singeli & REPLXX enabled by default 2023-05-12 20:51:25 +03:00

Tests

Must be run from the projects root directory.

test/mainCfgs.sh path/to/mlochbaum/BQN // run the test suite for a couple primary configurations
test/x86Cfgs.sh  path/to/mlochbaum/BQN // run the test suite for x86-64-specific configurations, including singeli; 32-bit build is "supposed" to fail one test involving ⋆⁼
test/moreCfgs.sh path/to/mlochbaum/BQN // run "2+2" in a bunch of configurations; requires dzaima/BQN to be accessible as dbqn
test/run.bqn // run tests in test/cases/
./BQN test/cmp.bqn // fuzz-test scalar comparison functions =≠<≤>≥
./BQN test/equal.bqn // fuzz-test 𝕨≡𝕩
./BQN test/copy.bqn // fuzz-test creating new arrays with elements copied from another
./BQN test/bitcpy.bqn // fuzz-test bit_cpy; requires -DTEST_BITCPY
./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/squeezeValid.bqn // fuzz-test squeezing giving a correct result
./BQN test/squeezeExact.bqn // fuzz-test squeezing giving the exact smallest result
./BQN test/various.bqn // tests for various small things
./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

legacy utilities:
  test/readTests.bqn // read mlochbaum/BQN tests in various formats
  test/precompiled.bqn // run a precompiled expression 

Format of tests in test/cases/:

%DEF somename some code # add a definition to be used by later tests or other %DEFs
%USE somename # copy-paste in the code of the given definition to here
tests:
  code that runs some !assertions # if there are no '!'s, 'lint' will complain
  !"error message" % erroring code # can be written as "!% erroring code" at first, and let 'update-messages' insert the message
  code %% expected value
  (
    multiline
    code
    running !assertions
    # the '(' and ')' lines must have no other characters in them
  )

# flags addable anywhere in code:
  %SLOW # enable only if 'slow' argument present
  %NDEBUG # disable if 'debug' argument present
  %NHEAPVERIFY # disable if 'heapverify' argument present