swh:1:snp:aeaf3dbb58f5be84b565e73b5ade1503ee8cb6d6
Raw File
Tip revision: cda4560576f3b975008fe892fe4fcaaaa71019fe authored by Anish Tondwalkar on 16 March 2020, 20:43:43 UTC
fix tests
Tip revision: cda4560
Utils.hs
module Tests.Utils where

import Test.Tasty
import Test.Tasty.HUnit

import Language.Mist.UX (PPrint, pprint)

testGroupM :: (Monad m) => TestName -> [m TestTree] -> m TestTree
testGroupM n xs = testGroup n <$> sequence xs


(@/=?) :: (Eq a, Show a, HasCallStack) => a -> a -> Assertion
x @/=? y = (x /= y) @? msg
  where
    msg = "expected: " ++ show x ++ " /= " ++ show y ++ "\n but: " ++ show x ++ " == " ++ show y
back to top