From 7744fe459043238c5ec4de49ff825d1a3c56080c 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 +++++++- .../tests/UnitTests/Distribution/Utils/Structured.hs | 2 +- Cabal-tree-diff/src/Data/TreeDiff/Instances/Cabal.hs | 2 ++ .../tests/UnitTests/Distribution/Client/ProjectConfig.hs | 8 +++++--- 4 files changed, 15 insertions(+), 5 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-tests/tests/UnitTests/Distribution/Utils/Structured.hs b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs index cf244262173..9a28fea9368 100644 --- a/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs +++ b/Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs @@ -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 ] 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),