Skip to content

Commit

Permalink
test for ifElse going the other way around
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximilianAlgehed committed Apr 25, 2024
1 parent 3fcc07d commit ec332ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libs/constrained-generators/src/Constrained/Examples/Basic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,12 @@ canFollowLike = constrained' $ \p q ->
, assert $ ma <=. ma'
, ma' `dependsOn` ma
]

ifElseBackwards :: Specification BaseFn (Int, Int)
ifElseBackwards = constrained' $ \p q ->
[ ifElse
(p ==. 1)
(q <=. 0)
(0 <. q)
, p `dependsOn` q
]
1 change: 1 addition & 0 deletions libs/constrained-generators/test/Constrained/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ tests =
testSpec "rangeHint" rangeHint
testSpec "basicSpec" basicSpec
testSpec "canFollowLike" canFollowLike
testSpec "ifElseBackwards" ifElseBackwards
numberyTests
sizeTests
numNumSpecTree
Expand Down

0 comments on commit ec332ea

Please sign in to comment.