Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
b125c753
Commit
b125c753
authored
8 years ago
by
kristenk
Browse files
Options
Downloads
Patches
Plain Diff
Add solver quickcheck test
parent
61fb6fad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/QuickCheck.hs
+11
-0
11 additions, 0 deletions
...ests/Distribution/Client/Dependency/Modular/QuickCheck.hs
with
11 additions
and
0 deletions
cabal-install/tests/UnitTests/Distribution/Client/Dependency/Modular/QuickCheck.hs
+
11
−
0
View file @
b125c753
...
@@ -42,6 +42,14 @@ tests = [
...
@@ -42,6 +42,14 @@ tests = [
ReverseOrder
->
reverse
targets
ReverseOrder
->
reverse
targets
in
counterexample
(
showResults
r1
r2
)
$
in
counterexample
(
showResults
r1
r2
)
$
isJust
(
resultPlan
r1
)
===
isJust
(
resultPlan
r2
)
isJust
(
resultPlan
r1
)
===
isJust
(
resultPlan
r2
)
,
testProperty
"solvable without --independent-goals => solvable with --independent-goals"
$
\
(
SolverTest
db
targets
)
reorderGoals
solver
->
let
r1
=
solve
reorderGoals
(
IndepGoals
False
)
solver
targets
db
r2
=
solve
reorderGoals
(
IndepGoals
True
)
solver
targets
db
in
counterexample
(
showResults
r1
r2
)
$
isJust
(
resultPlan
r1
)
`
implies
`
isJust
(
resultPlan
r2
)
]
]
where
where
showResults
::
Result
->
Result
->
String
showResults
::
Result
->
Result
->
String
...
@@ -53,6 +61,9 @@ tests = [
...
@@ -53,6 +61,9 @@ tests = [
++
resultLog
result
++
resultLog
result
++
[
"result: "
++
show
(
resultPlan
result
)]
++
[
"result: "
++
show
(
resultPlan
result
)]
implies
::
Bool
->
Bool
->
Bool
implies
x
y
=
not
x
||
y
solve
::
ReorderGoals
->
IndepGoals
->
Solver
->
[
PN
]
->
TestDb
->
Result
solve
::
ReorderGoals
->
IndepGoals
->
Solver
->
[
PN
]
->
TestDb
->
Result
solve
reorder
indep
solver
targets
(
TestDb
db
)
=
solve
reorder
indep
solver
targets
(
TestDb
db
)
=
let
(
lg
,
result
)
=
let
(
lg
,
result
)
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment