Tweaked Arbitrary instance to help avoid timeouts in tests.
This commit is contained in:
parent
fe6ea8eb32
commit
77cf7f9cac
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ instance Arbitrary Blocks where
|
|||
arbitrary = liftM fromList arbitrary
|
||||
|
||||
instance Arbitrary Inline where
|
||||
arbitrary = resize 3 $ arbInline 3
|
||||
arbitrary = resize 3 $ arbInline 2
|
||||
|
||||
arbInlines :: Int -> Gen [Inline]
|
||||
arbInlines n = listOf1 (arbInline n) `suchThat` (not . startsWithSpace)
|
||||
|
@ -72,7 +72,7 @@ arbInline n = frequency $ [ (60, liftM Str realString)
|
|||
]
|
||||
|
||||
instance Arbitrary Block where
|
||||
arbitrary = resize 3 $ arbBlock 3
|
||||
arbitrary = resize 3 $ arbBlock 2
|
||||
|
||||
arbBlock :: Int -> Gen Block
|
||||
arbBlock n = frequency $ [ (10, liftM Plain $ arbInlines (n-1))
|
||||
|
|
Loading…
Add table
Reference in a new issue