File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
cabal-install/tests/UnitTests/Distribution/Solver/Modular Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,20 @@ import UnitTests.Distribution.Solver.Modular.QuickCheck.Utils
5252
5353tests :: [TestTree ]
5454tests =
55- [ -- This test checks that certain solver parameters do not affect the
55+ [ testPropertyWithSeed " solver does not throw exceptions" $
56+ \ test goalOrder reorderGoals indepGoals prefOldest ->
57+ let r =
58+ solve
59+ (EnableBackjumping True )
60+ (FineGrainedConflicts True )
61+ reorderGoals
62+ (CountConflicts True )
63+ indepGoals
64+ prefOldest
65+ (getBlind <$> goalOrder)
66+ test
67+ in resultPlan r `seq` ()
68+ , -- This test checks that certain solver parameters do not affect the
5669 -- existence of a solution. It runs the solver twice, and only sets those
5770 -- parameters on the second run. The test also applies parameters that
5871 -- can affect the existence of a solution to both runs.
@@ -516,6 +529,11 @@ instance Arbitrary IndependentGoals where
516529
517530 shrink (IndependentGoals indep) = [IndependentGoals False | indep]
518531
532+ instance Arbitrary PreferOldest where
533+ arbitrary = PreferOldest <$> arbitrary
534+
535+ shrink (PreferOldest prefOldest) = [PreferOldest False | prefOldest]
536+
519537instance Arbitrary Component where
520538 arbitrary =
521539 oneof
You can’t perform that action at this time.
0 commit comments