Skip to content

Commit

Permalink
Only generate token bundles with positive coin values.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Jan 11, 2021
1 parent ff68037 commit 61138b5
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -6,7 +6,7 @@ module Cardano.Wallet.Primitive.Types.TokenBundle.Gen
import Prelude

import Cardano.Wallet.Primitive.Types.Coin.Gen
( genCoinSmall, shrinkCoinSmall )
( genCoinSmallPositive, shrinkCoinSmallPositive )
import Cardano.Wallet.Primitive.Types.TokenBundle
( TokenBundle (..) )
import Cardano.Wallet.Primitive.Types.TokenMap.Gen
Expand All @@ -22,11 +22,11 @@ import Test.QuickCheck.Extra

genTokenBundleSmallRange :: Gen TokenBundle
genTokenBundleSmallRange = TokenBundle
<$> genCoinSmall
<$> genCoinSmallPositive
<*> genTokenMapSmallRange

shrinkTokenBundleSmallRange :: TokenBundle -> [TokenBundle]
shrinkTokenBundleSmallRange (TokenBundle c m) =
uncurry TokenBundle <$> shrinkInterleaved
(c, shrinkCoinSmall)
(c, shrinkCoinSmallPositive)
(m, shrinkTokenMapSmallRange)

0 comments on commit 61138b5

Please sign in to comment.