diff --git a/test/README.md b/test/README.md index aecdb6b4..f83651af 100644 --- a/test/README.md +++ b/test/README.md @@ -12,7 +12,6 @@ test/run.bqn // run tests in test/cases/ ./BQN test/copy.bqn // fuzz-test creating new arrays with elements copied from another ./BQN test/bit.bqn // fuzz-test •bit functions ./BQN test/mut.bqn // fuzz-test mut.h (currently just bitarr fill) -./BQN test/hash.bqn // fuzz-test hashing ./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 diff --git a/test/hash.bqn b/test/cases/fuzz/hash.bqn similarity index 89% rename from test/hash.bqn rename to test/cases/fuzz/hash.bqn index 5096f8a1..bfc7a754 100644 --- a/test/hash.bqn +++ b/test/cases/fuzz/hash.bqn @@ -1,6 +1,7 @@ +### WHOLE-FILE-TEST # note: tests only bit/i8/i16/i32 arrays; no f64/c8/c16/c32/generic array tests -u ← ⌊100×(•UnixTime+1|100וMonoTime)@ -R ← (•MakeRand •Show u).Range +helpers ← ⊑•args +R ← (helpers.GetRand@).Range M ← (2⋆32)⊸×⊸+´ Test ← { 𝕊: @@ -23,3 +24,4 @@ fails ← 0‿0 {𝕊: fails+↩ Test@}¨↕1000 •Out ∾⟨"Collisions: " ⋄ •Repr 0⊑fails ⋄ " (expected 0, assuming no actual hash collisions)"⟩ •Out ∾⟨"Mismatches: " ⋄ •Repr 1⊑fails ⋄ " (expected 0)"⟩ +! 0 = 1⊑fails