git.iko.soy/typeable/pandoc
on master help sign in
Tweaked Arbitrary instance to help avoid timeouts in tests.
commit77cf7f9cac66b8fd59be546979850026c738833a authorJohn MacFarlane <jgm@berkeley.edu> dateSun 31 Jul 2011, 08:47 (15 years ago) parentfe6ea8e
1 file changed+2−2
src/Tests/Arbitrary.hs+2−2
src/Tests/Arbitrary.hs+2−2
@@ -28,7 +28,7 @@ instance Arbitrary Blocks where
2828 arbitrary = liftM fromList arbitrary
2929
3030instance Arbitrary Inline where
31− arbitrary = resize 3 $ arbInline 3
31+ arbitrary = resize 3 $ arbInline 2
3232
3333arbInlines :: Int -> Gen [Inline]
3434arbInlines n = listOf1 (arbInline n) `suchThat` (not . startsWithSpace)
@@ -72,7 +72,7 @@ arbInline n = frequency $ [ (60, liftM Str realString)
7272 ]
7373
7474instance Arbitrary Block where
75− arbitrary = resize 3 $ arbBlock 3
75+ arbitrary = resize 3 $ arbBlock 2
7676
7777arbBlock :: Int -> Gen Block
7878arbBlock n = frequency $ [ (10, liftM Plain $ arbInlines (n-1))