Removed Apropos
This commit is contained in:
parent
fa5bb7eec2
commit
c260254cae
5 changed files with 1060 additions and 1980 deletions
|
|
@ -1,11 +1,11 @@
|
|||
{- |
|
||||
Module : Spec.Generator
|
||||
Module : Property.Generator
|
||||
Maintainer : seungheon.ooh@gmail.com
|
||||
Description: Generic generators for property tests
|
||||
|
||||
Shared generators for all Agora property tests
|
||||
-}
|
||||
module Spec.Generator (
|
||||
module Property.Generator (
|
||||
-- * Credentials
|
||||
genPubKeyHash,
|
||||
genUserCredential,
|
||||
|
|
@ -17,10 +17,6 @@ module Spec.Generator (
|
|||
genValue,
|
||||
genAssetClass,
|
||||
genAnyValue,
|
||||
|
||||
-- * Tx info
|
||||
genTxOut,
|
||||
genTxInInfo,
|
||||
) where
|
||||
|
||||
import Control.Applicative (Applicative (liftA2))
|
||||
|
|
@ -29,11 +25,7 @@ import Data.ByteString.Hash (sha2)
|
|||
import Plutus.V1.Ledger.Api (
|
||||
Address (Address),
|
||||
Credential (..),
|
||||
DatumHash (DatumHash),
|
||||
PubKeyHash (PubKeyHash),
|
||||
TxInInfo (TxInInfo),
|
||||
TxOut (..),
|
||||
TxOutRef (TxOutRef),
|
||||
ValidatorHash (ValidatorHash),
|
||||
Value,
|
||||
toBuiltin,
|
||||
|
|
@ -49,7 +41,6 @@ import Test.QuickCheck (
|
|||
Gen,
|
||||
chooseAny,
|
||||
elements,
|
||||
listOf,
|
||||
listOf1,
|
||||
oneof,
|
||||
)
|
||||
|
|
@ -28,7 +28,7 @@ import Plutus.V1.Ledger.Api (
|
|||
ScriptContext (scriptContextTxInfo),
|
||||
TxInfo (txInfoSignatories),
|
||||
)
|
||||
import Spec.Generator (genAnyValue, genPubKeyHash)
|
||||
import Property.Generator (genAnyValue, genPubKeyHash)
|
||||
import Test.Tasty (TestTree)
|
||||
import Test.Tasty.Plutarch.Property (classifiedProperty)
|
||||
import Test.Tasty.QuickCheck (
|
||||
|
|
@ -40,7 +40,7 @@ import Test.Tasty.QuickCheck (
|
|||
vectorOf,
|
||||
)
|
||||
|
||||
-- | apropos model for testing multisigs.
|
||||
-- | Model for testing multisigs.
|
||||
type MultiSigModel = (MultiSig, ScriptContext)
|
||||
|
||||
-- | Propositions that may hold true of a `MultiSigModel`.
|
||||
|
|
@ -63,7 +63,7 @@ genMultiSigProp :: MultiSigProp -> Gen MultiSigModel
|
|||
genMultiSigProp prop = do
|
||||
size <- chooseInt (4, 20)
|
||||
pkhs <- vectorOf size genPubKeyHash
|
||||
vutxo <- pure . ValidatorUTXO () <$> genAnyValue
|
||||
vutxo <- ValidatorUTXO () <$> genAnyValue
|
||||
minSig <- chooseInt (1, length pkhs)
|
||||
othersigners <- take 20 <$> listOf genPubKeyHash
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue