-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
161 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Tests.API where | ||
|
||
import Foreword | ||
|
||
import Gen.Core.Raw (evalExprGen, genExpr, genType) | ||
import Hedgehog | ||
import Primer.API (viewTreeExpr, viewTreeType) | ||
|
||
hprop_viewTreeExpr :: Property | ||
hprop_viewTreeExpr = property $ do | ||
e1 <- forAll $ evalExprGen 0 genExpr | ||
e2 <- forAll $ evalExprGen 0 genExpr | ||
when (e1 == e2) discard | ||
viewTreeExpr e1 /== viewTreeExpr e2 | ||
|
||
hprop_viewTreeType :: Property | ||
hprop_viewTreeType = property $ do | ||
t1 <- forAll $ evalExprGen 0 genType | ||
t2 <- forAll $ evalExprGen 0 genType | ||
when (t1 == t2) discard | ||
viewTreeType t1 /== viewTreeType t2 |