2020-09-13 18:46:34 +00:00
|
|
|
{-# LANGUAGE TypeApplications #-}
|
|
|
|
|
|
|
|
module GHCup.Types.JSONSpec where
|
|
|
|
|
|
|
|
import GHCup.ArbitraryTypes ()
|
2021-10-30 11:23:02 +00:00
|
|
|
import GHCup.Types hiding ( defaultSettings )
|
2020-09-13 18:46:34 +00:00
|
|
|
import GHCup.Types.JSON ()
|
2022-11-22 11:41:44 +00:00
|
|
|
import GHCup.Prelude
|
2020-09-13 18:46:34 +00:00
|
|
|
|
|
|
|
import Test.Aeson.GenericSpecs
|
|
|
|
import Test.Hspec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spec :: Spec
|
|
|
|
spec = do
|
2022-11-22 11:41:44 +00:00
|
|
|
roundtripAndGoldenSpecsWithSettings (defaultSettings { goldenDirectoryOption = CustomDirectoryName goldenDir }) (Proxy @GHCupInfo)
|
|
|
|
where
|
|
|
|
goldenDir
|
|
|
|
| isWindows = "test/golden/windows"
|
|
|
|
| otherwise = "test/golden/unix"
|
2021-09-04 13:27:57 +00:00
|
|
|
|