diff options
author | Nikita Popov <nikic@php.net> | 2015-04-18 17:30:28 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-04-18 17:30:28 +0200 |
commit | f616a6f1ebf7ec8ece54022791f078bea8a1e973 (patch) | |
tree | 1c467c29fd2ad7f8ffc7e5278229ef6168af84d3 | |
parent | a302d51695fa5a48149c042b20f38efcabdc3b7c (diff) | |
download | php-git-f616a6f1ebf7ec8ece54022791f078bea8a1e973.tar.gz |
Fix intdiv() test
-rw-r--r-- | ext/standard/tests/math/intdiv.phpt | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/standard/tests/math/intdiv.phpt b/ext/standard/tests/math/intdiv.phpt index cff8469445..9362be638f 100644 --- a/ext/standard/tests/math/intdiv.phpt +++ b/ext/standard/tests/math/intdiv.phpt @@ -7,22 +7,25 @@ var_dump(intdiv(-3, 2)); var_dump(intdiv(3, -2)); var_dump(intdiv(-3, -2)); var_dump(intdiv(PHP_INT_MAX, PHP_INT_MAX)); -var_dump(intdiv(-PHP_INT_MAX - 1, -PHP_INT_MAX - 1)); -var_dump(intdiv(-PHP_INT_MAX - 1, -1)); +var_dump(intdiv(PHP_INT_MIN, PHP_INT_MIN)); +try { + var_dump(intdiv(PHP_INT_MIN, -1)); +} catch (Exception $e) { + echo "Exception: " . $e->getMessage() . "\n"; +} try { var_dump(intdiv(1, 0)); } catch (Exception $e) { - echo "\nException: " . $e->getMessage() . "\n"; + echo "Exception: " . $e->getMessage() . "\n"; } ?> ---EXPECTF-- +--EXPECT-- int(1) int(-1) int(-1) int(1) int(1) int(1) -int(0) - +Exception: Division of PHP_INT_MIN by -1 is not an integer Exception: Division by zero |