tasty-silver-3.2.3: 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

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

Instances

Instances details
IsTest Golden Source # 
Instance details

Defined in Test.Tasty.Silver.Internal

Methods

run :: OptionSet -> Golden -> (Progress -> IO ()) -> IO Result

testOptions :: Tagged Golden [OptionDescription]

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

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 (Maybe (a -> IO ())) 
forall a. GRNoGolden (m a) (a -> IO GShow) (Maybe (a -> IO ())) 

Instances

Instances details
Show (GoldenResult' m) Source # 
Instance details

Defined in Test.Tasty.Silver.Internal