This format is based on Keep A Changelog.
PArbitrary
forPDatumHash
, which agrees with theDatumHash
instance inInstances
.PArbitrary
forPTxId
, which agrees with theTxId
instance inInstances
.PArbitrary
forPTxOutRef
, which agrees with theTxOutRef
instance inInstances
.
PArbitrary
forPPOSIXTime
now generates only non-negative values, in agreement with thePOSIXTime
instance inInstances
.PArbitrary
forPStakingCredential
now ensures thatPStakingPtr
values are bounded to theWord64
range, in agreement with theStakingCredential
instance inInstances
.PArbitrary
forPTokenName
now emits only ASCII strings, in agreement with theTokenName
instance inInstances
. Unlike theTokenName
instance,PArbitrary
forPTokenName
does not shrink.
- Now property reports with traces if evalation failed.
NotPLam
,PWrapLam
,PUnLamHask
, andFromPFun
constraints are added.
fromPPartial
allows using a partial function likePVaildator
. It will expect given function to returnPOpaque
and success.fromFailingPPartial
allows users to test for a Plutarch partial function that will fail. Unlike QCexpectFailure
, this will not abort after first encounter of the failure.pexpectFailure
changes regular unplam-ed Plutarch function into expecting failure. It does samething asfromFailingPPartial
but it can be used on return type other thanPOpaque
.FailingTestableTerm
is a wrapper around regularTestableTerm
but indicates a case is expecting a failure.
shouldCrash
andshouldRun
helpers for Haskell-level property definitions based onScript
outcomes.
- Newtype wrapper
TimeDelta
for generating bounded changes inPOSIXTime
. - Function
withTimeDelta
for CPS-style consumption ofTimeDelta
s. - Function
timeDeltaProperty
for CPS-style consumption ofTimeDelta
s in aProperty
context.
Plutarch.Test.QuickCheck.Instances
module, containing orphan instances for QuickCheck type classes for many Plutus types.Plutarch.Test.QuickCheck.Modifiers
module, containing newtype wrappers to aid QuickCheck use with types that can be generated in multiple ways:CurrencySymbol
, with an option to include or exclude the ADA symbolValue
, with the ability to control ADA and non-ADA entry amounts
- Tests to ensure generators are behaving themselves. Currently only has tests
for
Value
.
unTestableTerm
is now a regular function, not a field selector.
- Vendored
Plutarch.Extra.Maybe
module is removed as now it is provided byPlutonomicon/plutarch-plutus/plutarch-extra
.
pwrapLam
wraps any Plutarch functions intoPFun
for function generation.punlam'
brings Plutarch level functions into Haskell level functions where each term is wrapped inTestableTerm
. It will require type of the final term.punlam
is identical topunlam'
but it will evaluate the given Plutarch function for better performance.Eqaulity
andPartiality
option is provided withhaskEquiv
function.
- In
Arbitrary
instance ofPArbitrary
, everytime it shrinks, it also gets evaluated. This solves the issue with terms getting extremely large when there are multiple shrinks. fromPFun
is now implmented withpwrapLam
andpunlam
.
TestableTerm
hides existential type variableS
and thus allow generation of Plutarch values.PArbitrary
typeclass wraps QuickCheckArbitrary
. It defines a generator and shrinker ofTestableTerm a
PCoArbitrary
typeclass wraps QuickCheckCoArbitrary
.fromPFun
bring Plutarch function into Haskell level withTestableTerm
.haskEquiv
defines properties with a given Haskell equivlance of a Plutarch function.haskEquiv'
is likehaskEquiv
but uses default generators.shrinkPLift
is a shrinker for Plutarch types that havePLift
instances.arbitraryPLift
is a generator for Plutarch types that havePLift
instances.PArbitrary
instances for various types.PCoArbitrary
instances for various types.- Utilities for
TestableTerm
.
classifiedPropertyNative
--classifiedProperty
with Haskell functions.
alwaysFailProperty
-- an universial property that ensures script always fails
- Bug that made
classifiedProperty
fail to differentiate between wrong result and expected crash when script ran without crashing. (Fixed #5)
- First release