Debian Codegraph @

Test/Tasty/Golden/Manage.hs

raw
1 {-# LANGUAGE GeneralizedNewtypeDeriving, PatternGuards, DeriveDataTypeable #-}
2 -- | Previously, accepting tests (by the @--accept@ flag) was done by this
3 -- module, and there was an ingredient to handle that mode.
4 --
5 -- Now it's done as part of a normal test run. When the `--accept` flag is
6 -- given, it makes golden tests to update the files whenever there is
7 -- a mismatch. So you no longer need this module. It remains only for
8 -- backwards compatibility.
9 module Test.Tasty.Golden.Manage
10 (
11 -- * Command line helpers
12 defaultMain
13
14 -- * The ingredient
15 , acceptingTests
16 , AcceptTests(..)
17 )
18 where
19
20 import Test.Tasty hiding (defaultMain)
21 import Test.Tasty.Runners
22 import Test.Tasty.Golden.Internal
23
24 -- | This exists only for backwards compatibility. Use
25 -- 'Test.Tasty.defaultMain' instead.
26 defaultMain :: TestTree -> IO ()
27 defaultMain = defaultMainWithIngredients [acceptingTests, listingTests, consoleTestReporter]
28
29 -- | This exists only for backwards compatibility. You don't need to
30 -- include this anymore.
31 acceptingTests :: Ingredient
32 acceptingTests = TestManager [] $ \_ _ -> Nothing