HTF 0.12.0.0 → 0.12.1.0
raw patch · 4 files changed
+26/−2 lines, 4 filesdep ~basedep ~haskell-src-extsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, haskell-src-exts
API changes (from Hackage documentation)
+ Test.Framework.AssertM: instance Applicative AssertBool
+ Test.Framework.AssertM: instance Functor AssertBool
Files
- ChangeLog +5/−1
- HTF.cabal +1/−1
- Test/Framework/AssertM.hs +9/−0
- Test/Framework/HaskellParser.hs +11/−0
ChangeLog view
@@ -1,4 +1,8 @@-* 0.12.0+* 0.12.1.0 (2014-09-16)+ - support for haskell-src-exts version 1.16+ - Functor and Applicative instances for AssertBool++* 0.12.0.0 (2014-07-14) - support for several new commandline options: --history=FILE Path to the history file. Default: ./.HTF/<ProgramName>.history --fail-fast Fail and abort test run as soon as the first test fails.
HTF.cabal view
@@ -1,5 +1,5 @@ Name: HTF-Version: 0.12.0.0+Version: 0.12.1.0 License: LGPL License-File: LICENSE Copyright: (c) 2005-2012 Stefan Wehr
Test/Framework/AssertM.hs view
@@ -12,6 +12,8 @@ import Data.Maybe import qualified Data.Text as T+import Control.Applicative (Applicative(..))+import Control.Monad (liftM, ap) import Test.Framework.TestInterface import Test.Framework.Location@@ -41,6 +43,13 @@ -- | Assertion fails with the given stack trace. In the stack trace, the outermost stackframe comes first. | AssertFailed [AssertStackElem] deriving (Eq, Ord, Show, Read)++instance Functor AssertBool where+ fmap = liftM++instance Applicative AssertBool where+ pure = return+ (<*>) = ap instance Monad AssertBool where return = AssertOk
Test/Framework/HaskellParser.hs view
@@ -161,7 +161,17 @@ Module moduleName (map transformImport imports) (mapMaybe transformDecl decls) (mapMaybe transformComment comments)+#if MIN_VERSION_haskell_src_exts(1,16,0) transformImport (Syn.ImportDecl loc (Syn.ModuleName s)+ qualified _ _ _ alias _) =+ let alias' = case alias of+ Nothing -> Nothing+ Just (Syn.ModuleName s) -> Just s+ in ImportDecl s qualified alias' (transformLoc loc)+ transformDecl (Syn.PatBind loc (Syn.PVar name) _ _) =+ Just $ Decl (transformLoc loc) (transformName name)+#else+ transformImport (Syn.ImportDecl loc (Syn.ModuleName s) qualified _ _ alias _) = let alias' = case alias of Nothing -> Nothing@@ -169,6 +179,7 @@ in ImportDecl s qualified alias' (transformLoc loc) transformDecl (Syn.PatBind loc (Syn.PVar name) _ _ _) = Just $ Decl (transformLoc loc) (transformName name)+#endif transformDecl (Syn.FunBind (Syn.Match loc name _ _ _ _ : _)) = Just $ Decl (transformLoc loc) (transformName name) transformDecl _ = Nothing