tasty-silver-3.1.4: Golden tests support for tasty. Fork of tasty-golden.

Safe HaskellNone
LanguageHaskell2010

Test.Tasty.Silver.Internal

Synopsis

Documentation

data Golden Source

See goldenTest1 for explanation of the fields

Constructors

forall a . Golden (IO (Maybe a)) (IO a) (a -> a -> IO GDiff) (a -> IO GShow) (a -> IO ()) 

newtype AcceptTests Source

This option, when set to True, specifies that we should run in the «accept tests» mode

Constructors

AcceptTests Bool 

readFileMaybe :: FilePath -> IO (Maybe ByteString) Source

Read the file if it exists, else return Nothing. Useful for reading golden files.

data GDiff Source

The comparison/diff result.

Constructors

Equal

Values are equal.

DiffText

The two values are different, show a diff between the two given texts.

ShowDiffed

The two values are different, just show the given text to the user.

Fields

gReason :: Maybe String
 
gDiff :: Text
 

data GShow Source

How to show a value to the user.

Constructors

ShowText Text

Show the given text.

data GoldenResult' m Source

Constructors

GREqual 
forall a . GRDifferent a a GDiff (a -> IO ()) 
forall a . GRNoGolden (m a) (a -> IO GShow) (a -> IO ())