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
|
||||
|
||||
|
|
|
|||
|
|
@ -117,8 +117,6 @@ common deps
|
|||
common test-deps
|
||||
build-depends:
|
||||
, agora
|
||||
, apropos
|
||||
, apropos-tx
|
||||
, data-default-class
|
||||
, mtl
|
||||
, plutarch-context-builder
|
||||
|
|
@ -177,6 +175,7 @@ library agora-testlib
|
|||
library agora-specs
|
||||
import: lang, deps, test-deps
|
||||
exposed-modules:
|
||||
Property.Generator
|
||||
Property.MultiSig
|
||||
Sample.Effect.GovernorMutation
|
||||
Sample.Effect.TreasuryWithdrawal
|
||||
|
|
@ -188,7 +187,6 @@ library agora-specs
|
|||
Spec.AuthorityToken
|
||||
Spec.Effect.GovernorMutation
|
||||
Spec.Effect.TreasuryWithdrawal
|
||||
Spec.Generator
|
||||
Spec.Governor
|
||||
Spec.Proposal
|
||||
Spec.Stake
|
||||
|
|
|
|||
2992
flake.lock
generated
2992
flake.lock
generated
File diff suppressed because it is too large
Load diff
25
flake.nix
25
flake.nix
|
|
@ -27,19 +27,6 @@
|
|||
"github:liqwid-labs/plutarch-quickcheck";
|
||||
inputs.plutarch-context-builder.url =
|
||||
"git+ssh://git@github.com/Liqwid-Labs/plutarch-context-builder?ref=main";
|
||||
# Follows jhodgdev's forks of apropos and apropos-tx, as these
|
||||
# are not constrained to `base ^>= 4.14`. Once these are merged
|
||||
# to their respective master branches, we should change the
|
||||
# inputs to follow a commit on those master branches. For more
|
||||
# info, see: https://github.com/mlabs-haskell/apropos-tx/pull/37
|
||||
inputs.apropos-tx.url =
|
||||
"github:jhodgdev/apropos-tx?rev=4eca3fac23c339caee04ea6176e641a4b3857a25";
|
||||
inputs.apropos-tx.inputs.nixpkgs.follows =
|
||||
"plutarch/haskell-nix/nixpkgs-unstable";
|
||||
inputs.apropos.url =
|
||||
"github:mlabs-haskell/apropos?rev=3734bb3baa297ed990725a5ef14efcbb6a1c1c23";
|
||||
inputs.apropos.inputs.nixpkgs.follows =
|
||||
"plutarch/haskell-nix/nixpkgs-unstable";
|
||||
|
||||
# Purescript
|
||||
inputs.purescript-bridge.url =
|
||||
|
|
@ -103,14 +90,6 @@
|
|||
src = inputs.plutarch-context-builder;
|
||||
subdirs = [ "." ];
|
||||
}
|
||||
{
|
||||
src = inputs.apropos-tx;
|
||||
subdirs = [ "." ];
|
||||
}
|
||||
{
|
||||
src = inputs.apropos;
|
||||
subdirs = [ "." ];
|
||||
}
|
||||
{
|
||||
src = inputs.purescript-bridge;
|
||||
subdirs = [ "." ];
|
||||
|
|
@ -152,10 +131,6 @@
|
|||
ps.tasty-quickcheck
|
||||
ps.plutarch-quickcheck
|
||||
ps.plutarch-context-builder
|
||||
ps.apropos-tx
|
||||
ps.apropos
|
||||
ps.apropos
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue