From d86d9260df7fc9addccd289df7a15d9b36b21ae1 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 22 Jan 2011 12:18:23 -0800 Subject: Tests.Arbitrary: Added instances for Inlines, Blocks. --- tests/Tests/Arbitrary.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/Tests/Arbitrary.hs') 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 -- cgit v1.2.3