Added quickcheck tests for normalize in Shared.
This commit is contained in:
parent
b3fb541d01
commit
d41c17a2d5
3 changed files with 23 additions and 4 deletions
|
@ -303,9 +303,12 @@ Executable test-pandoc
|
||||||
else
|
else
|
||||||
Ghc-Options: -Wall
|
Ghc-Options: -Wall
|
||||||
Extensions: CPP
|
Extensions: CPP
|
||||||
Build-Depends: base >= 4 && < 5, Diff, test-framework,
|
Build-Depends: base >= 4 && < 5, Diff, test-framework >= 0.3 && < 0.4,
|
||||||
test-framework-hunit, HUnit, QuickCheck > 2
|
test-framework-hunit >= 0.2 && < 0.3,
|
||||||
|
test-framework-quickcheck2 >= 0.2 && < 0.3,
|
||||||
|
HUnit >= 1.2 && < 1.3, QuickCheck >= 2.3 && < 2.5
|
||||||
Other-Modules: Tests.Old
|
Other-Modules: Tests.Old
|
||||||
Tests.Helpers
|
Tests.Helpers
|
||||||
Tests.Arbitrary
|
Tests.Arbitrary
|
||||||
|
Tests.Shared
|
||||||
Tests.Readers.LaTeX
|
Tests.Readers.LaTeX
|
||||||
|
|
13
tests/Tests/Shared.hs
Normal file
13
tests/Tests/Shared.hs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
module Tests.Shared (tests) where
|
||||||
|
import Test.Framework.Providers.QuickCheck2
|
||||||
|
import Test.Framework
|
||||||
|
import Tests.Arbitrary
|
||||||
|
import Text.Pandoc.Shared
|
||||||
|
import Text.Pandoc
|
||||||
|
|
||||||
|
normalize_rt :: Pandoc -> Bool
|
||||||
|
normalize_rt d = normalize (normalize d) == normalize d
|
||||||
|
|
||||||
|
tests :: [Test]
|
||||||
|
tests = [ testProperty "normalize_rt" normalize_rt ]
|
||||||
|
|
|
@ -6,11 +6,14 @@ import Test.Framework
|
||||||
|
|
||||||
import qualified Tests.Old
|
import qualified Tests.Old
|
||||||
import qualified Tests.Readers.LaTeX
|
import qualified Tests.Readers.LaTeX
|
||||||
|
import qualified Tests.Shared
|
||||||
|
|
||||||
tests :: [Test]
|
tests :: [Test]
|
||||||
tests = [ testGroup "Old" Tests.Old.tests
|
tests = [ testGroup "Old" Tests.Old.tests
|
||||||
, testGroup "Readers" [ testGroup "LaTeX" Tests.Readers.LaTeX.tests
|
, testGroup "Readers"
|
||||||
]
|
[ testGroup "LaTeX" Tests.Readers.LaTeX.tests
|
||||||
|
]
|
||||||
|
, testGroup "Shared" Tests.Shared.tests
|
||||||
]
|
]
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
|
Loading…
Reference in a new issue