Skip to content

Commit

Permalink
Use mempty instead of TokenQuantity.zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Aug 29, 2023
1 parent c869abe commit 4e496c7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3846,7 +3846,7 @@ prop_splitBundlesWithExcessiveAssetCounts_sum
prop_splitBundlesWithExcessiveTokenQuantities_length
:: NonEmpty TokenBundle -> TokenQuantity -> Property
prop_splitBundlesWithExcessiveTokenQuantities_length input maxQuantityAllowed =
maxQuantityAllowed > TokenQuantity.zero ==> checkCoverage $ property $
maxQuantityAllowed > mempty ==> checkCoverage $ property $
cover 5 (lengthOutput > lengthInput)
"length has increased" $
cover 5 (lengthOutput == lengthInput)
Expand Down Expand Up @@ -3875,7 +3875,7 @@ prop_splitBundlesWithExcessiveTokenQuantities_length input maxQuantityAllowed =
prop_splitBundlesWithExcessiveTokenQuantities_sum
:: NonEmpty TokenBundle -> TokenQuantity -> Property
prop_splitBundlesWithExcessiveTokenQuantities_sum ms maxQuantity =
maxQuantity > TokenQuantity.zero ==>
maxQuantity > mempty ==>
F.fold (splitBundlesWithExcessiveTokenQuantities ms maxQuantity)
=== F.fold ms

Expand Down Expand Up @@ -4162,7 +4162,7 @@ prop_reduceTokenQuantities_order reduceQty qtyDiffs =
inAscendingOrder xs = NE.sort xs == xs

-- A list of quantities already in ascending order.
qtys = NE.scanl (<>) TokenQuantity.zero qtyDiffs
qtys = NE.scanl (<>) mempty qtyDiffs

--------------------------------------------------------------------------------
-- Utility functions
Expand Down

0 comments on commit 4e496c7

Please sign in to comment.