tasty-silver-3.1.13: A fancy test runner, including support for golden tests.

Safe HaskellNone
LanguageHaskell2010

Test.Tasty.Silver.Internal

Synopsis

Documentation

data Golden Source #

See goldenTest1 for explanation of the fields

Constructors

Golden (IO (Maybe a)) (IO a) (a -> a -> IO GDiff) (a -> IO GShow) (Maybe (a -> IO ())) 
Instances
IsTest Golden Source # 
Instance details

Defined in Test.Tasty.Silver.Internal

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

data GShow Source #

How to show a value to the user.

Constructors

ShowText Text

Show the given text.

data GoldenResult' m Source #

Constructors

GREqual 
GRDifferent a a GDiff (Maybe (a -> IO ())) 
GRNoGolden (m a) (a -> IO GShow) (Maybe (a -> IO ())) 
Instances
Show (GoldenResult' m) Source # 
Instance details

Defined in Test.Tasty.Silver.Internal