hunit-rematch 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+21/−2 lines, 2 files
Files
- Test/Rematch/HUnit.hs +18/−0
- hunit-rematch.cabal +3/−2
+ Test/Rematch/HUnit.hs view
@@ -0,0 +1,18 @@+module Test.Rematch.HUnit where+import Test.HUnit(Assertion, assertFailure)+import Control.Rematch+import Control.Rematch.Run++-- |Run a matcher as an HUnit assertion+--+-- Example output:+--+-- @+--Expected: equalTo "a"+-- but: was "b"+-- @+expect :: a -> Matcher a -> Assertion+expect a matcher = case res of+ MatchSuccess -> return ()+ (MatchFailure msg) -> assertFailure msg+ where res = runMatch matcher a
hunit-rematch.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: hunit-rematch-version: 0.1.0.0+version: 0.1.0.1 synopsis: HUnit support for rematch -- description: homepage: github.com/tcrayford/rematch@@ -18,7 +18,8 @@ library -- exposed-modules: -- other-modules: - build-depends: base ==4.5.*+ build-depends: base ==4.5.*, rematch >= 0.2, HUnit >= 1.2+ exposed-modules: Test.Rematch.HUnit test-suite tests build-depends: base >= 4.5.0 && < 5, hspec >= 1.4, HUnit >= 1.2, rematch >= 0.2 type: exitcode-stdio-1.0