aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-06-29 16:07:55 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-06-29 16:07:55 -0400
commit463f9529924d34fa3243870219ff87dd0e3a2ea7 (patch)
tree823b11fb0993a7ac7f2baad842897c9e9f53aca0 /test
parent5adcb79010f43ab4ed6ac43eb4e1d8cb10c630a2 (diff)
Avoid regenerating arguments across character +-¬
Diffstat (limited to 'test')
-rw-r--r--test/fuzz.bqn11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/fuzz.bqn b/test/fuzz.bqn
index 6a8b5452..3f7e430d 100644
--- a/test/fuzz.bqn
+++ b/test/fuzz.bqn
@@ -136,19 +136,18 @@ RandDyShape ← {
(Rand 2) ⌽ ≍○<⟜Prefix RandShape 𝕩
}
TestDyArith ← opts.dyArith{
+ ch ← 0<+´≠¨ pmn ← (∊⟜𝕗⥊¨⊢) +‿-‿¬
(0<≠f←𝕗) ⊑ 1‿{
sh ← RandDyShape 𝕩
_t ← { ! 𝕏 _testConsistent_ FlatMatch´ 𝕗 }
(𝕨⊸RandArith¨ sh)_t¨ f
{
k←𝕩
- p‿m‿n ← (∊/⊣)⟜f¨ ⟨+⟩‿⟨-⟩‿⟨¬⟩
- rca ← ⟨RandChar,RandArith⟩
+ rca ← ⟨RandChar,RandArith⟩{k𝕎𝕩}¨sh
Fit ← -⟜(@+1-˜17×2⋆16)⌈-⟜@⌊⊢
- { (⌽⍟(Rand 2) -∘Fit⟜-` rca{k𝕎𝕩}¨sh)_t 𝕩 }¨ p
- { s←Rand 2⋄(Fit`⍟s(⊣`⍟(¬s)rca){k𝕎𝕩}¨sh)_t 𝕩 }¨ m
- { s←Rand 2⋄((1+Fit)`⍟s(⊣`⍟(¬s)rca){k𝕎𝕩}¨sh)_t 𝕩 }¨ n
- }⍟(0⊸<∧≤⟜5) 𝕨
+ ⟨⌽⍟(Rand 2)-∘Fit⟜-`,Fit`,(1+Fit)`⟩ { (𝕎rca)_t 𝕩 }¨¨ pmn
+ { (sh (k RandChar ⊣)⌾(1⊸⊑) rca)_t¨ 𝕩 }⍟(0<≠) ∾1↓pmn
+ }⍟(ch∧0⊸<∧≤⟜5) 𝕨
}
}