git.iko.soy/typeable/pandoc
on master help sign in
Only override --quickcheck-tests=N if N is not default value (100).

Some of the round-trip tests are set to do a maximum of 25 trials when the default value is given. Closes #4956.

commit885cbfd42061eecd22822f75869b056e9642b20c authorJohn MacFarlane <jgm@berkeley.edu> dateMon 15 Oct 2018, 22:15 (8 years ago) parent85394d4
2 files changed+12−2
test/Tests/Readers/HTML.hs+6−1 test/Tests/Readers/Muse.hs+6−1
test/Tests/Readers/HTML.hs+6−1
@@ -7,6 +7,7 @@ import Data.Text (Text)
77import qualified Data.Text as T
88import Test.Tasty
99import Test.Tasty.QuickCheck
10+import Test.Tasty.Options (IsOption(defaultValue))
1011import Tests.Helpers
1112import Text.Pandoc
1213import Text.Pandoc.Arbitrary ()
@@ -77,5 +78,9 @@ tests = [ testGroup "base tag"
7778 , test htmlNativeDivs "<main> followed by text" $ "<main>main content</main>non-main content" =?>
7879 doc (divWith ("", [], [("role", "main")]) (plain (text "main content")) <> plain (text "non-main content"))
7980 ]
80− , testProperty "Round trip" (withMaxSuccess 25 roundTrip)
81+ , askOption $ \(QuickCheckTests numtests) ->
82+ testProperty "Round trip" $
83+ withMaxSuccess (if QuickCheckTests numtests == defaultValue
84+ then 25
85+ else numtests) roundTrip
8186 ]
test/Tests/Readers/Muse.hs+6−1
@@ -8,6 +8,7 @@ import Data.Text (Text)
88import qualified Data.Text as T
99import Test.Tasty
1010import Test.Tasty.QuickCheck
11+import Test.Tasty.Options (IsOption(defaultValue))
1112import Tests.Helpers
1213import Text.Pandoc
1314import Text.Pandoc.Arbitrary ()
@@ -262,7 +263,11 @@ tests =
262263 ]
263264
264265 , testGroup "Blocks"
265− [ testProperty "Round trip" (withMaxSuccess 25 roundTrip)
266+ [ askOption $ \(QuickCheckTests numtests) ->
267+ testProperty "Round trip" $
268+ withMaxSuccess (if QuickCheckTests numtests == defaultValue
269+ then 25
270+ else numtests) roundTrip
266271 , "Block elements end paragraphs" =:
267272 T.unlines [ "First paragraph"
268273 , "----"