goldenTest :: TestNametest name
-> IO aget 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 aget the tested value
-> (a -> a -> IO (Maybe String))-> (a -> IO ())update the golden file
-> TestTree
A very general testing function.