Skip to content

Commit

Permalink
Restore shrinking behaviour for TokenQuantity in TokenMapSpec.
Browse files Browse the repository at this point in the history
The shrinker for `Arbitrary TokenQuantity` should allow zero values.

See:

#2765 (review)
  • Loading branch information
jonathanknowles committed Jul 20, 2021
1 parent 4aeb220 commit 83e51d5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ instance Arbitrary TokenQuantity where
-- verify that the token map invariant (that a map contains no
-- zero-valued tokens) is maintained.
arbitrary = genTokenQuantitySmall
shrink = shrinkTokenQuantitySmallPositive
shrink = shrinkTokenQuantitySmall

instance Arbitrary (Positive TokenQuantity) where
arbitrary = Positive <$> genTokenQuantitySmallPositive
Expand Down

0 comments on commit 83e51d5

Please sign in to comment.