aboutsummaryrefslogtreecommitdiff
path: root/test/fuzz.bqn
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-09-17 10:37:14 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-09-17 10:37:14 -0400
commit7631b1c54c3d03ae88f6536a89daedb4c8d562b1 (patch)
tree1a173c456e8c28abfcbad58154aadc0dd2d20723 /test/fuzz.bqn
parent57194701f21dac645e2b3f820008de6c235f83cb (diff)
Avoid generating a negative first entry in RandRep
Diffstat (limited to 'test/fuzz.bqn')
-rw-r--r--test/fuzz.bqn6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/fuzz.bqn b/test/fuzz.bqn
index 4aa41ea0..706c33ce 100644
--- a/test/fuzz.bqn
+++ b/test/fuzz.bqn
@@ -204,11 +204,11 @@ _testDySearch ← { # ⊐⊒∊⍋⍒
as { ! 𝕨 𝕏 _testConsistent_ ≡ b }¨ {𝕏˜}⍟(∊˙⊸=)¨ 𝕗
}
-RandRep ← -⟜»∘∧ 1⊸+⊸gen.Index⟜⥊
-_testIndices ← { # /
+RandRep ← -⟜((0⌊1⊸↑)⊸»)∘∧ 1⊸+⊸gen.Index⟜⥊
+_testIndices ← { # /⊔
(RandRep○RandBound˜ 𝕩)⊸{ ! 𝕏 _testConsistent_ ≡ 𝕨 }¨ 𝕗
}
-_testSelect ← { # /⊏
+_testSelect ← { # /⊏⊔
l‿sh ← (⍋≠¨)⊸⊏ RandShape¨ 𝕩‿𝕩
n ← RandBound 𝕩
d ← 𝕨 gen.Struct sh