Specs use generalized format so that it can be used for benchmarking
This commit is contained in:
parent
efca275f29
commit
4b56edb25c
9 changed files with 103 additions and 85 deletions
|
|
@ -7,7 +7,7 @@ Description: Tests for Stake policy and validator
|
|||
|
||||
Tests for Stake policy and validator
|
||||
-}
|
||||
module Spec.Stake (tests) where
|
||||
module Spec.Stake (specs) where
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -15,10 +15,6 @@ import Prelude
|
|||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
import Test.Tasty (TestTree, testGroup)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
import Agora.Stake (Stake (..), StakeDatum (StakeDatum), StakeRedeemer (DepositWithdraw))
|
||||
import Agora.Stake.Scripts (stakePolicy, stakeValidator)
|
||||
|
||||
|
|
@ -26,14 +22,21 @@ import Agora.Stake.Scripts (stakePolicy, stakeValidator)
|
|||
|
||||
import Sample.Stake (DepositWithdrawExample (DepositWithdrawExample, delta, startAmount), signer)
|
||||
import Sample.Stake qualified as Stake
|
||||
import Test.Util (policyFailsWith, policySucceedsWith, toDatum, validatorFailsWith, validatorSucceedsWith)
|
||||
import Spec.Spec (
|
||||
SpecificationTree,
|
||||
group,
|
||||
policyFailsWith,
|
||||
policySucceedsWith,
|
||||
validatorFailsWith,
|
||||
validatorSucceedsWith,
|
||||
)
|
||||
import Test.Util (toDatum)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
-- | Stake tests.
|
||||
tests :: [TestTree]
|
||||
tests =
|
||||
[ testGroup
|
||||
specs :: [SpecificationTree]
|
||||
specs =
|
||||
[ group
|
||||
"policy"
|
||||
[ policySucceedsWith
|
||||
"stakeCreation"
|
||||
|
|
@ -51,7 +54,7 @@ tests =
|
|||
()
|
||||
Stake.stakeCreationUnsigned
|
||||
]
|
||||
, testGroup
|
||||
, group
|
||||
"validator"
|
||||
[ validatorSucceedsWith
|
||||
"stakeDepositWithdraw deposit"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue