aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/Tests/Arbitrary.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/Tests/Arbitrary.hs b/tests/Tests/Arbitrary.hs
index bd506a44f..825902e4c 100644
--- a/tests/Tests/Arbitrary.hs
+++ b/tests/Tests/Arbitrary.hs
@@ -1,4 +1,5 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# LANGUAGE TypeSynonymInstances #-}
-- provides Arbitrary instance for Pandoc types
module Tests.Arbitrary ()
where
@@ -7,6 +8,7 @@ import Test.QuickCheck.Arbitrary
import Control.Monad (liftM, liftM2)
import Text.Pandoc
import Text.Pandoc.Shared
+import Text.Pandoc.Builder
realString :: Gen String
realString = elements wordlist
@@ -14,6 +16,12 @@ realString = elements wordlist
wordlist :: [String]
wordlist = ["foo","Bar","baz","\\","/",":","\"","'","féé"]
+instance Arbitrary Inlines where
+ arbitrary = liftM fromList arbitrary
+
+instance Arbitrary Blocks where
+ arbitrary = liftM fromList arbitrary
+
instance Arbitrary Inline where
arbitrary = resize 3 $ arbInline 3