com php-src: Fix intdiv() test: ext/standard/tests/math/intdiv.phpt

From: Date: Sat, 18 Apr 2015 15:30:28 +0000
Subject: com php-src: Fix intdiv() test: ext/standard/tests/math/intdiv.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86370@lists.php.net to get a copy of this message
Commit: f616a6f1ebf7ec8ece54022791f078bea8a1e973 Author: Nikita Popov <nikic@php.net> Sat, 18 Apr 2015 17:30:28 +0200 Parents: a302d51695fa5a48149c042b20f38efcabdc3b7c Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f616a6f1ebf7ec8ece54022791f078bea8a1e973 Log: Fix intdiv() test Changed paths: M ext/standard/tests/math/intdiv.phpt Diff: diff --git a/ext/standard/tests/math/intdiv.phpt b/ext/standard/tests/math/intdiv.phpt index cff8469..9362be6 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

« previous php.cvs (#86370) next »