forked from IntersectMBO/plutus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 2 bsaic test cases for Interval.isEmpty
- Loading branch information
1 parent
3afb23e
commit ff495db
Showing
2 changed files
with
24 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Spec.IntervalSpec where | ||
|
||
import Test.Tasty | ||
import Test.Tasty.HUnit | ||
|
||
import Plutus.V1.Ledger.Interval | ||
import Plutus.V1.Ledger.Slot | ||
|
||
alwaysIsNotEmpty :: TestTree | ||
alwaysIsNotEmpty = testCase "always is not empty" $ | ||
assertBool "always" (not $ isEmpty (always :: Interval Slot)) | ||
|
||
neverIsEmpty :: TestTree | ||
neverIsEmpty = | ||
testCase "never is empty" $ | ||
assertBool "never" (isEmpty (never :: Interval Slot)) | ||
|
||
tests :: TestTree | ||
tests = testGroup "plutus-ledger-api-interval" [ | ||
neverIsEmpty | ||
, alwaysIsNotEmpty | ||
] |