|
3 | 3 |
|
4 | 4 | module Test.Hedgehog.Golden.ErrorMessage where |
5 | 5 |
|
6 | | -import Cardano.Api (Error (..)) |
7 | | -import Cardano.Api.Internal.Pretty |
8 | | - |
9 | | -import qualified Control.Concurrent.QSem as IO |
10 | | -import Control.Exception (bracket_) |
11 | | -import Control.Monad |
12 | | -import Control.Monad.IO.Class |
13 | | -import Data.Algorithm.Diff (PolyDiff (Both), getGroupedDiff) |
14 | | -import Data.Algorithm.DiffOutput (ppDiff) |
15 | | -import Data.Data |
16 | | -import qualified Data.List as List |
17 | | -import qualified Data.Text as Text |
18 | | -import qualified Data.Text.IO as Text |
19 | | -import GHC.Stack (HasCallStack, withFrozenCallStack) |
20 | | -import qualified GHC.Stack as GHC |
21 | | -import qualified System.Directory as IO |
22 | | -import qualified System.Environment as IO |
23 | | -import System.FilePath (takeDirectory, (</>)) |
24 | | -import qualified System.IO as IO |
25 | | -import qualified System.IO.Unsafe as IO |
26 | | - |
27 | | -import Hedgehog |
28 | | -import qualified Hedgehog.Extras.Test as H |
29 | | -import qualified Hedgehog.Internal.Property as H |
30 | | -import Test.Tasty |
31 | | -import Test.Tasty.Hedgehog |
| 6 | +import Cardano.Api (Error (..)) |
| 7 | +import Cardano.Api.Internal.Pretty |
| 8 | + |
| 9 | +import Control.Concurrent.QSem qualified as IO |
| 10 | +import Control.Exception (bracket_) |
| 11 | +import Control.Monad |
| 12 | +import Control.Monad.IO.Class |
| 13 | +import Data.Algorithm.Diff (PolyDiff (Both), getGroupedDiff) |
| 14 | +import Data.Algorithm.DiffOutput (ppDiff) |
| 15 | +import Data.Data |
| 16 | +import Data.List qualified as List |
| 17 | +import Data.Text qualified as Text |
| 18 | +import Data.Text.IO qualified as Text |
| 19 | +import GHC.Stack (HasCallStack, withFrozenCallStack) |
| 20 | +import GHC.Stack qualified as GHC |
| 21 | +import System.Directory qualified as IO |
| 22 | +import System.Environment qualified as IO |
| 23 | +import System.FilePath (takeDirectory, (</>)) |
| 24 | +import System.IO qualified as IO |
| 25 | +import System.IO.Unsafe qualified as IO |
| 26 | + |
| 27 | +import Hedgehog |
| 28 | +import Hedgehog.Extras.Test qualified as H |
| 29 | +import Hedgehog.Internal.Property qualified as H |
| 30 | +import Test.Tasty |
| 31 | +import Test.Tasty.Hedgehog |
32 | 32 |
|
33 | 33 | -- | Generate test tree for the list of values. This 'TestTree' will serialize the values using 'Error' |
34 | 34 | -- instance and compare them against golden files in the provided location. |
@@ -136,9 +136,9 @@ diffVsGoldenFile actualContent goldenFile = GHC.withFrozenCallStack $ do |
136 | 136 |
|
137 | 137 | if |
138 | 138 | | recreateGoldenFiles -> writeGoldenFile goldenFile actualContent |
139 | | - | fileExists -> checkAgainstGoldenFile goldenFile actualLines |
140 | | - | createGoldenFiles -> writeGoldenFile goldenFile actualContent |
141 | | - | otherwise -> reportGoldenFileMissing goldenFile |
| 139 | + | fileExists -> checkAgainstGoldenFile goldenFile actualLines |
| 140 | + | createGoldenFiles -> writeGoldenFile goldenFile actualContent |
| 141 | + | otherwise -> reportGoldenFileMissing goldenFile |
142 | 142 | where |
143 | 143 | actualLines = List.lines actualContent |
144 | 144 |
|
|
0 commit comments