Skip to content

Commit fcb31a4

Browse files
committed
Add test case from review
1 parent e508ea6 commit fcb31a4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ext/bcmath/tests/bcround_precision_bounds.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,15 @@ try {
2424
} catch (\ValueError $e) {
2525
echo $e->getMessage() . \PHP_EOL;
2626
}
27+
try {
28+
(new BcMath\Number('1'))->round(2147483648); // INT_MAX + 1
29+
} catch (\ValueError $e) {
30+
echo $e->getMessage() . \PHP_EOL;
31+
}
2732
?>
2833
--EXPECTF--
2934
bcround(): Argument #2 ($precision) must be between %i and %i
3035
bcround(): Argument #2 ($precision) must be between %i and %i
3136
bcround(): Argument #2 ($precision) must be between %i and %i
3237
BcMath\Number::round(): Argument #1 ($precision) must be between %i and %i
38+
BcMath\Number::round(): Argument #1 ($precision) must be between %i and %i

0 commit comments

Comments
 (0)