move test/random.bqn to test/run.bqn system
This commit is contained in:
parent
01fea8904d
commit
405d0ee0e1
@ -8,7 +8,6 @@ test/x86Cfgs.sh path/to/mlochbaum/BQN // run the test suite for x86-64-specific
|
||||
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/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
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
u ← ⌊100×(•UnixTime+1|100וMonoTime)@
|
||||
|
||||
Range ← (•MakeRand •Show u).Range
|
||||
### WHOLE-FILE-TEST
|
||||
# tests (•MakeRand x).Range itself
|
||||
helpers ← ⊑•args
|
||||
seed0 ← (helpers.GetRand@).Range 1e18
|
||||
Range ← (•MakeRand seed0).Range
|
||||
|
||||
ExpectedRangeStep ← { n‿len𝕊depth‿max:
|
||||
ls ← {𝕊:len Range max}¨↕n
|
||||
@ -31,11 +33,11 @@ ExpectedRange ← ExpectedRangeStep⟜(0⊸⋈)
|
||||
# •Show (+´÷≠) |{𝕊: 10‿1000 ExpectedRange 1e6}¨↕10000
|
||||
|
||||
am ← 10000
|
||||
•Out "general"
|
||||
# •Out "general"
|
||||
((500+↕20)∾↕10) {(⌊(5×am)÷𝕨⌈1)‿𝕨 ExpectedRange 𝕩}⌜ 3‿10‿100‿1000‿10000‿100000‿1e8‿1e15 ∾ ⥊¯1‿0‿1+⌜2⋆2↓↕34
|
||||
(↕10) {! ∧´0=𝕩 Range 1}⌜ ↕200
|
||||
|
||||
•Out "bit boolean"
|
||||
# •Out "bit boolean"
|
||||
{⟨5×am,𝕩⟩ ExpectedRange 2}¨ ⥊31‿32‿33×⌜↕100
|
||||
•Out "float"
|
||||
# •Out "float"
|
||||
{⟨2×am,𝕩⟩ ExpectedRange 0}¨ ↕100
|
||||
Loading…
Reference in New Issue
Block a user