Skip to content

Commit 913bb1f

Browse files
committed
Add missing test for ceab2e3
1 parent 94fcdc6 commit 913bb1f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/BigDecimalTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,14 @@ public function testOfExponentTooLargeThrowsException(string $value): void
275275
public static function providerOfExponentTooLargeThrowsException(): array
276276
{
277277
return [
278+
// Exponent string does not fit in a native integer.
278279
['1e1000000000000000000000000000000'],
279280
['1e-1000000000000000000000000000000'],
281+
282+
// Exponent fits in a native integer, but computing the scale as
283+
// strlen(fractional) - exponent overflows the native integer range.
284+
['1.5e-' . PHP_INT_MAX],
285+
['1.25e-' . PHP_INT_MAX],
280286
];
281287
}
282288

0 commit comments

Comments
 (0)