From 9567d558197fba63a13b33fc893e11aeb8de4b28 Mon Sep 17 00:00:00 2001 From: Fendor Date: Wed, 28 Jul 2021 11:04:34 +0200 Subject: [PATCH] Fix cabal tests --- Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs | 8 +++++++- Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs | 2 ++ .../tests/UnitTests/Distribution/Client/ProjectConfig.hs | 8 +++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs b/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs index 3d471ea6283..b2b6853c604 100644 --- a/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs +++ b/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs @@ -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 @@ -486,6 +486,12 @@ instance Arbitrary PackageDB where , SpecificPackageDB <$> arbitraryShortToken ] +------------------------------------------------------------------------------- +-- DumpBuildInfo +------------------------------------------------------------------------------- + +instance Arbitrary DumpBuildInfo where + arbitrary = arbitraryBoundedEnum ------------------------------------------------------------------------------- -- Helpers diff --git a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs index 40765a6764b..98bb586d507 100644 --- a/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs +++ b/Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs @@ -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) @@ -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 diff --git a/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs b/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs index 3681ac1d900..062f3df67d4 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs @@ -558,7 +558,7 @@ instance Arbitrary PackageConfig where <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary - <*> arbitrary <*> arbitrary + <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitraryFlag arbitraryShortToken <*> arbitrary @@ -616,6 +616,7 @@ instance Arbitrary PackageConfig where , packageConfigCoverage = x25 , packageConfigRelocatable = x26 , packageConfigDebugInfo = x27 + , packageConfigDumpBuildInfo = x27_1 , packageConfigRunTests = x28 , packageConfigDocumentation = x29 , packageConfigHaddockHoogle = x30 @@ -671,6 +672,7 @@ instance Arbitrary PackageConfig where , packageConfigCoverage = x25' , packageConfigRelocatable = x26' , packageConfigDebugInfo = x27' + , packageConfigDumpBuildInfo = x27_1' , packageConfigRunTests = x28' , packageConfigDocumentation = x29' , packageConfigHaddockHoogle = x30' @@ -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'), @@ -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),