Skip to content

Commit

Permalink
Remove me. Want to see if it was the read file that was the problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Nov 19, 2024
1 parent dd8b4ec commit c1195d7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cardano-api/gen/Test/Hedgehog/Golden/ErrorMessage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,8 @@ testErrorMessage_ goldenFilesLocation moduleName typeName constructorName err =
let fqtn = moduleName <> "." <> typeName
testProperty constructorName . withTests 1 . property $ do
H.note_ "Incorrect error message in golden file"
H.note_ "What the value looks like in memory"
let pErr = docToString (prettyError err)
H.note_ $ show pErr
diffVsGoldenFile
pErr
(docToString (prettyError err))
(goldenFilesLocation </> fqtn </> constructorName <> ".txt")

-- Upstream to hedgehog-extras
Expand Down Expand Up @@ -168,9 +165,7 @@ createGoldenFiles = IO.unsafePerformIO $ do
writeFile' :: (MonadTest m, MonadIO m, HasCallStack) => FilePath -> String -> m ()
writeFile' filePath contents = GHC.withFrozenCallStack $ do
void . H.annotate $ "Writing file: " <> filePath
H.evalIO $ IO.withFile filePath IO.WriteMode $ \handle -> do
IO.hSetEncoding handle IO.utf8
IO.hPutStr handle contents
H.evalIO $ IO.writeFile filePath contents

checkAgainstGoldenFile
:: ()
Expand Down

0 comments on commit c1195d7

Please sign in to comment.