Skip to content

Commit adb58f6

Browse files
committed
add tests
1 parent 74775f1 commit adb58f6

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

ext/gmp/tests/gmp_pow_fpe.phpt

+13-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,20 @@ try {
1414
try {
1515
gmp_pow(256, PHP_INT_MAX);
1616
} catch (\ValueError $e) {
17-
echo $e->getMessage();
17+
echo $e->getMessage() . PHP_EOL;
1818
}
19+
20+
var_dump(gmp_pow(gmp_add(gmp_mul(gmp_init(PHP_INT_MAX), gmp_init(PHP_INT_MAX)), 3), 256));
21+
var_dump(gmp_pow(gmp_init(PHP_INT_MAX), 256));
1922
?>
20-
--EXPECT--
23+
--EXPECTF--
2124
base and exponent overflow
2225
base and exponent overflow
26+
object(GMP)#%d (1) {
27+
["num"]=>
28+
string(%d) "%s"
29+
}
30+
object(GMP)#%d (1) {
31+
["num"]=>
32+
string(%d) "%s"
33+
}

0 commit comments

Comments
 (0)