diff --git a/hunit/Test/Tasty/HUnit/Steps.hs b/hunit/Test/Tasty/HUnit/Steps.hs index af886cad..80595f13 100644 --- a/hunit/Test/Tasty/HUnit/Steps.hs +++ b/hunit/Test/Tasty/HUnit/Steps.hs @@ -16,13 +16,18 @@ newtype TestCaseSteps = TestCaseSteps ((String -> IO ()) -> Assertion) deriving Typeable instance IsTest TestCaseSteps where - run _ (TestCaseSteps assertionFn) _ = do + run _ (TestCaseSteps assertionFn) yieldProgress = do ref <- newIORef [] let stepFn :: String -> IO () stepFn msg = do tme <- getTime + -- The number of steps is not fixed, so we can't + -- provide the progress percentage. + -- We also don't provide the timings here, only + -- at the end. + yieldProgress (Progress msg 0) atomicModifyIORef ref (\l -> ((tme,msg):l, ())) hunitResult <- (Right <$> assertionFn stepFn) `catch` diff --git a/hunit/tasty-hunit.cabal b/hunit/tasty-hunit.cabal index e91d7537..7c0d9aa7 100644 --- a/hunit/tasty-hunit.cabal +++ b/hunit/tasty-hunit.cabal @@ -33,7 +33,7 @@ library Test.Tasty.HUnit.Steps other-extensions: TypeFamilies, DeriveDataTypeable build-depends: base >= 4.8 && < 5, - tasty >= 1.2.2 && < 1.6, + tasty >= 1.5 && < 1.6, call-stack < 0.5 -- hs-source-dirs: default-language: Haskell2010