Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Golden = forall a . Golden (IO (Maybe a)) (IO a) (a -> a -> IO GDiff) (a -> IO GShow) (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
- | forall a . GRDifferent a a GDiff (a -> IO ())
- | forall a . GRNoGolden (m a) (a -> IO GShow) (a -> IO ())
- runGolden :: Golden -> IO (Result, GoldenResult)
- forceGoldenResult :: GoldenResult -> IO GoldenResultI
Documentation
See goldenTest1
for explanation of the fields
newtype AcceptTests Source
This option, when set to True
, specifies that we should run in the
«accept tests» mode
readFileMaybe :: FilePath -> IO (Maybe ByteString) Source
Read the file if it exists, else return Nothing. Useful for reading golden files.
The comparison/diff result.
type GoldenResult = GoldenResult' IO Source
type GoldenResultI = GoldenResult' Identity Source
data GoldenResult' m Source
GREqual | |
forall a . GRDifferent a a GDiff (a -> IO ()) | |
forall a . GRNoGolden (m a) (a -> IO GShow) (a -> IO ()) |
Show (GoldenResult' m) |