Skip to content

Commit

Permalink
Fix cabal tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fendor committed Jul 28, 2021
1 parent 446af09 commit 7744fe4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
8 changes: 7 additions & 1 deletion Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Distribution.ModuleName
import Distribution.Simple.Compiler (DebugInfoLevel (..), OptimisationLevel (..), PackageDB (..), ProfDetailLevel (..), knownProfDetailLevels)
import Distribution.Simple.Flag (Flag (..))
import Distribution.Simple.InstallDirs
import Distribution.Simple.Setup (HaddockTarget (..), TestShowDetails (..))
import Distribution.Simple.Setup (HaddockTarget (..), TestShowDetails (..), DumpBuildInfo)
import Distribution.SPDX
import Distribution.System
import Distribution.Types.Dependency
Expand Down Expand Up @@ -486,6 +486,12 @@ instance Arbitrary PackageDB where
, SpecificPackageDB <$> arbitraryShortToken
]

-------------------------------------------------------------------------------
-- DumpBuildInfo
-------------------------------------------------------------------------------

instance Arbitrary DumpBuildInfo where
arbitrary = arbitraryBoundedEnum

-------------------------------------------------------------------------------
-- Helpers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tests = testGroup "Distribution.Utils.Structured"
, testCase "GenericPackageDescription" $
md5Check (Proxy :: Proxy GenericPackageDescription) 0x9b7d0415b1d2522d72ac9e9739c97574
, testCase "LocalBuildInfo" $
md5Check (Proxy :: Proxy LocalBuildInfo) 0x0ca1dc5da4c4695a9da40e080bf4f536
md5Check (Proxy :: Proxy LocalBuildInfo) 0x27c5bf440429a01a1d0beffbd9b06463
#endif
]

Expand Down
2 changes: 2 additions & 0 deletions Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Distribution.Simple.Setup (HaddockTarget, TestShowDetai
import Distribution.System
import Distribution.Types.AbiHash (AbiHash)
import Distribution.Types.ComponentId (ComponentId)
import Distribution.Types.DumpBuildInfo (DumpBuildInfo)
import Distribution.Types.PackageVersionConstraint
import Distribution.Types.UnitId (DefUnitId, UnitId)
import Distribution.Utils.NubList (NubList)
Expand Down Expand Up @@ -74,6 +75,7 @@ instance ToExpr CompilerId
instance ToExpr ComponentId
instance ToExpr DebugInfoLevel
instance ToExpr DefUnitId
instance ToExpr DumpBuildInfo
instance ToExpr ExeDependency
instance ToExpr Executable
instance ToExpr ExecutableScope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ instance Arbitrary PackageConfig where
<*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary <*> arbitrary
<*> arbitrary <*> arbitrary
<*> arbitraryFlag arbitraryShortToken
<*> arbitrary
Expand Down Expand Up @@ -616,6 +616,7 @@ instance Arbitrary PackageConfig where
, packageConfigCoverage = x25
, packageConfigRelocatable = x26
, packageConfigDebugInfo = x27
, packageConfigDumpBuildInfo = x27_1
, packageConfigRunTests = x28
, packageConfigDocumentation = x29
, packageConfigHaddockHoogle = x30
Expand Down Expand Up @@ -671,6 +672,7 @@ instance Arbitrary PackageConfig where
, packageConfigCoverage = x25'
, packageConfigRelocatable = x26'
, packageConfigDebugInfo = x27'
, packageConfigDumpBuildInfo = x27_1'
, packageConfigRunTests = x28'
, packageConfigDocumentation = x29'
, packageConfigHaddockHoogle = x30'
Expand Down Expand Up @@ -700,7 +702,7 @@ instance Arbitrary PackageConfig where
(x10', x11', x12', x13', x14'),
(x15', x16', x17', x18', x19')),
((x20', x20_1', x21', x22', x23', x24'),
(x25', x26', x27', x28', x29'),
(x25', x26', x27', x27_1', x28', x29'),
(x30', x31', x32', (x33', x33_1'), x34'),
(x35', x36', x37', x38', x43', x39'),
(x40', x41'),
Expand All @@ -714,7 +716,7 @@ instance Arbitrary PackageConfig where
map NonEmpty x18,
x19)),
((x20, x20_1, x21, x22, x23, x24),
(x25, x26, x27, x28, x29),
(x25, x26, x27, x27_1, x28, x29),
(x30, x31, x32, (x33, x33_1), x34),
(x35, x36, fmap NonEmpty x37, x38, x43, fmap NonEmpty x39),
(x40, x41),
Expand Down

0 comments on commit 7744fe4

Please sign in to comment.