heck 1.0.0.2 → 1.0.1.0
raw patch · 2 files changed
+18/−13 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Heck: assertGe :: forall m a (n :: Type -> Type). (HasCallStack, Applicative m, Ord a, Show a) => Test m n -> a -> a -> m ()
+ Heck: assertGt :: forall m a (n :: Type -> Type). (HasCallStack, Applicative m, Ord a, Show a) => Test m n -> a -> a -> m ()
+ Heck: assertLe :: forall m a (n :: Type -> Type). (HasCallStack, Applicative m, Ord a, Show a) => Test m n -> a -> a -> m ()
+ Heck: assertLt :: forall m a (n :: Type -> Type). (HasCallStack, Applicative m, Ord a, Show a) => Test m n -> a -> a -> m ()
+ Heck: assertNe :: forall m a (n :: Type -> Type). (HasCallStack, Applicative m, Eq a, Show a) => Test m n -> a -> a -> m ()
Files
- heck.cabal +1/−1
- source/library/Heck.hs +17/−12
heck.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: heck-version: 1.0.0.2+version: 1.0.1.0 synopsis: Abstract unit test interface description: Heck provides an abstract unit test interface. category: Testing
source/library/Heck.hs view
@@ -11,15 +11,20 @@ it :: String -> m () -> n () } -assertEq ::- (Stack.HasCallStack, Applicative m, Eq a, Show a) =>- Test m n ->- -- | expected- a ->- -- | actual- a ->- m ()-assertEq test expected actual =- Monad.when (expected /= actual)- . assertFailure test- $ "expected " <> show expected <> " but got " <> show actual+assertEq :: (Stack.HasCallStack, Applicative m, Eq a, Show a) => Test m n -> a -> a -> m ()+assertEq t x y = Monad.unless (x == y) . assertFailure t $ "expected: " <> show x <> " == " <> show y++assertNe :: (Stack.HasCallStack, Applicative m, Eq a, Show a) => Test m n -> a -> a -> m ()+assertNe t x y = Monad.unless (x /= y) . assertFailure t $ "expected: " <> show x <> " /= " <> show y++assertLt :: (Stack.HasCallStack, Applicative m, Ord a, Show a) => Test m n -> a -> a -> m ()+assertLt t x y = Monad.unless (x < y) . assertFailure t $ "expected: " <> show x <> " < " <> show y++assertLe :: (Stack.HasCallStack, Applicative m, Ord a, Show a) => Test m n -> a -> a -> m ()+assertLe t x y = Monad.unless (x <= y) . assertFailure t $ "expected: " <> show x <> " <= " <> show y++assertGt :: (Stack.HasCallStack, Applicative m, Ord a, Show a) => Test m n -> a -> a -> m ()+assertGt t x y = Monad.unless (x > y) . assertFailure t $ "expected: " <> show x <> " > " <> show y++assertGe :: (Stack.HasCallStack, Applicative m, Ord a, Show a) => Test m n -> a -> a -> m ()+assertGe t x y = Monad.unless (x >= y) . assertFailure t $ "expected: " <> show x <> " >= " <> show y