From 92825033b4348f72ffb5b7f8816051a074ad007d Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 12 Oct 2024 07:31:15 +0100 Subject: [PATCH] add test --- ext/gmp/tests/gmp_pow_fpe.phpt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/ext/gmp/tests/gmp_pow_fpe.phpt b/ext/gmp/tests/gmp_pow_fpe.phpt index d564853799c8d..591107467f386 100644 --- a/ext/gmp/tests/gmp_pow_fpe.phpt +++ b/ext/gmp/tests/gmp_pow_fpe.phpt @@ -6,15 +6,17 @@ gmp ---EXPECTF-- -object(GMP)#2 (1) { - ["num"]=> - string(%d) "%s" +try { + gmp_pow($g, PHP_INT_MAX); +} catch (\ValueError $e) { + echo $e->getMessage() . PHP_EOL; } -object(GMP)#2 (1) { - ["num"]=> - string(%d) "%s" +try { + gmp_pow(256, PHP_INT_MAX); +} catch (\ValueError $e) { + echo $e->getMessage(); } +?> +--EXPECT-- +base and exponent overflow +base and exponent overflow