Skip to content

Commit cd53b9e

Browse files
committed
wip
1 parent 70da6fa commit cd53b9e

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

  • plutus-core/untyped-plutus-core/testlib/Evaluation/Builtins
  • plutus-tx-plugin/test-ledger-api/Spec

plutus-core/untyped-plutus-core/testlib/Evaluation/Builtins/Definition.hs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ defaultBuiltinCostModelExt = (defaultBuiltinCostModelForTesting, ())
110110

111111
test_IntegerDistribution :: TestTree
112112
test_IntegerDistribution =
113-
QC.testProperty "distribution of 'Integer' constants" . QC.withNumTests 10000 $
113+
QC.testProperty "distribution of 'Integer' constants" . BaseQC.withNumTests 10000 $
114114
\(AsArbitraryBuiltin (i :: Integer)) ->
115115
let magnitudes = magnitudesPositive nextInterestingBound highInterestingBound
116116
(low, high) =
@@ -2017,7 +2017,7 @@ test_Case :: TestTree
20172017
test_Case =
20182018
testGroup
20192019
"Case on constants"
2020-
[ QC.testProperty "Bool, 1 branch" . QC.withNumTests 99 $
2020+
[ QC.testProperty "Bool, 1 branch" . BaseQC.withNumTests 99 $
20212021
\(scrut :: Bool) (i :: Integer) ->
20222022
let term :: TermLike term tyname name DefaultUni DefaultFun => term ()
20232023
term =
@@ -2030,7 +2030,7 @@ test_Case =
20302030
Right (EvaluationSuccess res) -> res == mkConstant () i
20312031
Right EvaluationFailure -> scrut
20322032
_ -> False
2033-
, QC.testProperty "Bool, 2 branches" . QC.withNumTests 99 $
2033+
, QC.testProperty "Bool, 2 branches" . BaseQC.withNumTests 99 $
20342034
\(scrut :: Bool) (i :: Integer) (j :: Integer) ->
20352035
let term :: TermLike term tyname name DefaultUni DefaultFun => term ()
20362036
term =
@@ -2041,7 +2041,7 @@ test_Case =
20412041
[mkConstant () i, mkConstant () j]
20422042
in Right (EvaluationSuccess . mkConstant () $ if not scrut then i else j)
20432043
QC.=== typecheckEvaluateCekNoEmit def defaultBuiltinCostModelForTesting term
2044-
, QC.testProperty "Bool, 3+ branches" . QC.withNumTests 99 $
2044+
, QC.testProperty "Bool, 3+ branches" . BaseQC.withNumTests 99 $
20452045
\(scrut :: Bool) (is :: [Integer]) ->
20462046
let term :: TermLike term tyname name DefaultUni DefaultFun => term ()
20472047
term =
@@ -2051,7 +2051,7 @@ test_Case =
20512051
(mkConstant () scrut)
20522052
(map (mkConstant ()) $ [1, 2, 3] <> is)
20532053
in isLeft $ typecheckEvaluateCekNoEmit def defaultBuiltinCostModelForTesting term
2054-
, QC.testProperty "Integer success" . QC.withNumTests 99 $
2054+
, QC.testProperty "Integer success" . BaseQC.withNumTests 99 $
20552055
\(QC.NonEmpty is :: QC.NonEmptyList Integer) ->
20562056
QC.forAll (QC.chooseInt (0, length is - 1)) $ \scrut ->
20572057
let term :: TermLike term tyname name DefaultUni DefaultFun => term ()
@@ -2063,7 +2063,7 @@ test_Case =
20632063
(map (mkConstant ()) is)
20642064
in Right (EvaluationSuccess . mkConstant () $ is !! scrut)
20652065
QC.=== typecheckEvaluateCekNoEmit def defaultBuiltinCostModelForTesting term
2066-
, QC.testProperty "Integer any" . QC.withNumTests 99 $
2066+
, QC.testProperty "Integer any" . BaseQC.withNumTests 99 $
20672067
\(scrut :: Integer) (is :: [Integer]) ->
20682068
let term :: TermLike term tyname name DefaultUni DefaultFun => term ()
20692069
term =
@@ -2076,7 +2076,7 @@ test_Case =
20762076
Left _ -> False
20772077
Right EvaluationFailure -> 0 > scrut || scrut >= fromIntegral (length is)
20782078
Right (EvaluationSuccess res) -> res == mkConstant () (is !! fromIntegral scrut)
2079-
, QC.testProperty "List, 1 branch" . QC.withNumTests 99 $
2079+
, QC.testProperty "List, 1 branch" . BaseQC.withNumTests 99 $
20802080
\(scrut :: [Integer]) ->
20812081
let
20822082
term :: Term TyName Name DefaultUni DefaultFun ()
@@ -2097,7 +2097,7 @@ test_Case =
20972097
(Right (EvaluationSuccess res), (x : _)) -> res == mkConstant () x
20982098
(Right EvaluationFailure, []) -> True
20992099
_ -> False
2100-
, QC.testProperty "List, 2 branches" . QC.withNumTests 99 $
2100+
, QC.testProperty "List, 2 branches" . BaseQC.withNumTests 99 $
21012101
\(scrut :: [Integer]) (i :: Integer) ->
21022102
let
21032103
term :: Term TyName Name DefaultUni DefaultFun ()
@@ -2120,7 +2120,7 @@ test_Case =
21202120
(Right (EvaluationSuccess res), []) -> res == mkConstant () i
21212121
(Right (EvaluationSuccess res), (x : _)) -> res == mkConstant () x
21222122
_ -> False
2123-
, QC.testProperty "List, 3+ branches" . QC.withNumTests 99 $
2123+
, QC.testProperty "List, 3+ branches" . BaseQC.withNumTests 99 $
21242124
\(scrut :: [Integer]) (is :: [Integer]) ->
21252125
let
21262126
term :: Term TyName Name DefaultUni DefaultFun ()

plutus-tx-plugin/test-ledger-api/Spec/Data/MintValue/V3.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ test_Plinth_MintValueBurnedIsPositive =
145145

146146
scaleTestsBy :: QC.Testable prop => Haskell.Int -> prop -> QC.Property
147147
scaleTestsBy factor =
148-
QC.withNumTests (100 Haskell.* factor) . QC.mapSize (Haskell.* factor)
148+
BaseQC.withNumTests (100 Haskell.* factor) . QC.mapSize (Haskell.* factor)
149149

150150
cekProp :: CompiledCode Bool -> Property
151151
cekProp code = evaluationResultMatchesHaskell code (===) True

plutus-tx-plugin/test-ledger-api/Spec/MintValue/V3.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ test_Plinth_MintValueBurnedIsPositive =
145145

146146
scaleTestsBy :: QC.Testable prop => Haskell.Int -> prop -> QC.Property
147147
scaleTestsBy factor =
148-
QC.withNumTests (100 Haskell.* factor) . QC.mapSize (Haskell.* factor)
148+
BaseQC.withNumTests (100 Haskell.* factor) . QC.mapSize (Haskell.* factor)
149149

150150
cekProp :: CompiledCode Bool -> Property
151151
cekProp code = evaluationResultMatchesHaskell code (===) True

0 commit comments

Comments
 (0)