aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/2.0.0/test/TestExchangeInternals
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src/2.0.0/test/TestExchangeInternals')
-rw-r--r--packages/contracts/src/2.0.0/test/TestExchangeInternals/TestExchangeInternals.sol19
1 files changed, 18 insertions, 1 deletions
diff --git a/packages/contracts/src/2.0.0/test/TestExchangeInternals/TestExchangeInternals.sol b/packages/contracts/src/2.0.0/test/TestExchangeInternals/TestExchangeInternals.sol
index 239dd10a8..5e2ae2f0e 100644
--- a/packages/contracts/src/2.0.0/test/TestExchangeInternals/TestExchangeInternals.sol
+++ b/packages/contracts/src/2.0.0/test/TestExchangeInternals/TestExchangeInternals.sol
@@ -96,7 +96,7 @@ contract TestExchangeInternals is
return getPartialAmountCeil(numerator, denominator, target);
}
- /// @dev Checks if rounding error > 0.1%.
+ /// @dev Checks if rounding error >= 0.1%.
/// @param numerator Numerator.
/// @param denominator Denominator.
/// @param target Value to multiply with numerator/denominator.
@@ -112,6 +112,23 @@ contract TestExchangeInternals is
{
return isRoundingError(numerator, denominator, target);
}
+
+ /// @dev Checks if rounding error >= 0.1%.
+ /// @param numerator Numerator.
+ /// @param denominator Denominator.
+ /// @param target Value to multiply with numerator/denominator.
+ /// @return Rounding error is present.
+ function publicIsRoundingErrorCeil(
+ uint256 numerator,
+ uint256 denominator,
+ uint256 target
+ )
+ public
+ pure
+ returns (bool isError)
+ {
+ return isRoundingErrorCeil(numerator, denominator, target);
+ }
/// @dev Updates state with results of a fill order.
/// @param order that was filled.