Safe Haskell | None |
---|---|
Language | Haskell2010 |
The main functions
:: TestName | test name |
-> IO a | get the golden correct value Note that this action may be followed by the update function call. Therefore, this action *should avoid* reading the file lazily; otherwise, the file may remain half-open and the update action will fail. |
-> IO a | get the tested value |
-> (a -> a -> IO (Maybe String)) | comparison function. If two values are the same, it should return The function may use |
-> (a -> IO ()) | update the golden file |
-> TestTree |
A very general testing function.
:: TestName | Test name |
-> IO a | Get the golden correct value Note that this action may be followed by the update function call. Therefore, this action *should avoid* reading the file lazily; otherwise, the file may remain half-open and the update action will fail. |
-> IO a | Get the tested value (in this case from the output file) |
-> (a -> a -> IO (Maybe String)) | Comparison function. If two values are the same, it should return The function may use |
-> (a -> IO ()) | Update the golden file |
-> IO () | Action to delete the output file |
-> TestTree |
A variant of goldenTest
that also provides for deleting the output
file. The DeleteOuputFile
option controls the circumstances in which
the output file is to be deleted.
Since: 2.3.4