Skip to content

Commit ef03dea

Browse files
committed
wip
1 parent d71d649 commit ef03dea

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

plutus-core/plutus-core.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ test-suite plutus-core-test
403403
, base16-bytestring ^>=1.0
404404
, bytestring
405405
, containers
406+
, cardano-base:{testlib} >=0.1.5
406407
, data-default-class
407408
, extra
408409
, filepath

plutus-core/plutus-core/test/Generators/QuickCheck/Utils.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import PlutusCore.Generators.QuickCheck.Utils
1010

1111
import Test.Tasty
1212
import Test.Tasty.QuickCheck
13+
import qualified Test.Cardano.Base.QuickCheck as BaseQC
1314

1415
{-| Test that both 'multiSplit1' and 'multiSplit0' produce a list such that 'concat'ing it gives
1516
back the input. -}
@@ -21,14 +22,14 @@ test_multiSplitSound =
2122
, ("multiSplit0", multiSplit0 0.1)
2223
]
2324
pure . testProperty name $ \(xs :: [Int]) ->
24-
withMaxSuccess 10000 . forAll (split xs) $ \aSplit ->
25+
BaseQC.withNumTests 10000 . forAll (split xs) $ \aSplit ->
2526
xs === concat aSplit
2627

2728
-- | Show the distribution of lists generated by a split function for a list of the given length.
2829
test_listDistribution :: Int -> ([()] -> Gen [[()]]) -> Int -> TestTree
2930
test_listDistribution numRuns split n =
3031
testProperty ("for a list of length " ++ show n) $
31-
withMaxSuccess numRuns . forAll (split $ replicate n ()) $ \aSplit ->
32+
BaseQC.withNumTests numRuns . forAll (split $ replicate n ()) $ \aSplit ->
3233
label (show $ map length aSplit) True
3334

3435
-- | Count the number of 'I' and 'B' nodes in a 'Data' object.
@@ -48,7 +49,7 @@ length of the spine. Ensures that the 'Data' generator is not exponential in 'B'
4849
test_arbitraryDataExpectedLeafs :: TestTree
4950
test_arbitraryDataExpectedLeafs =
5051
testProperty "'arbitrary @Data' has the expected number of 'B' and 'I' leaves" $
51-
withMaxSuccess 1000 . mapSize (* 5) $ \spine ->
52+
BaseQC.withNumTests 1000 . mapSize (* 5) $ \spine ->
5253
forAll (genDataFromSpine spine) $ \dat ->
5354
countIandBs dat === length spine
5455

0 commit comments

Comments
 (0)