| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Tasty.Silver.Internal
Synopsis
- data Golden = Golden (IO (Maybe a)) (IO a) (a -> a -> IO GDiff) (a -> IO GShow) (Maybe (a -> IO ()))
- newtype AcceptTests = AcceptTests Bool
- readFileMaybe :: FilePath -> IO (Maybe ByteString)
- data GDiff
- data GShow = ShowText Text
- type GoldenResult = GoldenResult' IO
- type GoldenResultI = GoldenResult' Identity
- data GoldenResult' m
- = GREqual
- | GRDifferent a a GDiff (Maybe (a -> IO ()))
- | GRNoGolden (m a) (a -> IO GShow) (Maybe (a -> IO ()))
- runGolden :: Golden -> IO (Result, GoldenResult)
- forceGoldenResult :: GoldenResult -> IO GoldenResultI
Documentation
See goldenTest1 for explanation of the fields
newtype AcceptTests #
This option, when set to True, specifies that we should run in the
«accept tests» mode
Constructors
| AcceptTests Bool |
Instances
| Eq AcceptTests # | |
Defined in Test.Tasty.Silver.Internal | |
| Ord AcceptTests # | |
Defined in Test.Tasty.Silver.Internal Methods compare :: AcceptTests -> AcceptTests -> Ordering # (<) :: AcceptTests -> AcceptTests -> Bool # (<=) :: AcceptTests -> AcceptTests -> Bool # (>) :: AcceptTests -> AcceptTests -> Bool # (>=) :: AcceptTests -> AcceptTests -> Bool # max :: AcceptTests -> AcceptTests -> AcceptTests # min :: AcceptTests -> AcceptTests -> AcceptTests # | |
| IsOption AcceptTests # | |
Defined in Test.Tasty.Silver.Internal Methods parseValue :: String -> Maybe AcceptTests # optionName :: Tagged AcceptTests String # | |
readFileMaybe :: FilePath -> IO (Maybe ByteString) #
Read the file if it exists, else return Nothing. Useful for reading golden files.
The comparison/diff result.
type GoldenResult = GoldenResult' IO #
type GoldenResultI = GoldenResult' Identity #
data GoldenResult' m #
Constructors
| GREqual | |
| GRDifferent a a GDiff (Maybe (a -> IO ())) | |
| GRNoGolden (m a) (a -> IO GShow) (Maybe (a -> IO ())) |
Instances
| Show (GoldenResult' m) # | |
Defined in Test.Tasty.Silver.Internal Methods showsPrec :: Int -> GoldenResult' m -> ShowS # show :: GoldenResult' m -> String # showList :: [GoldenResult' m] -> ShowS # | |