diff options
Diffstat (limited to 'tests/lang/operators/modulus_basiclong_64bit.phpt')
| -rw-r--r-- | tests/lang/operators/modulus_basiclong_64bit.phpt | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/tests/lang/operators/modulus_basiclong_64bit.phpt b/tests/lang/operators/modulus_basiclong_64bit.phpt index 3fef77d85c..4411a37f2b 100644 --- a/tests/lang/operators/modulus_basiclong_64bit.phpt +++ b/tests/lang/operators/modulus_basiclong_64bit.phpt @@ -18,9 +18,7 @@ $longVals = array( MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1 ); -$otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit); - -error_reporting(E_ERROR); +$otherVals = array(1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit); foreach ($longVals as $longVal) { foreach($otherVals as $otherVal) { @@ -33,7 +31,7 @@ foreach ($longVals as $longVal) { } } -foreach ($otherVals as $otherVal) { +foreach (array_merge([0], $otherVals) as $otherVal) { foreach($longVals as $longVal) { echo "--- testing: $otherVal % $longVal ---\n"; try { @@ -47,8 +45,6 @@ foreach ($otherVals as $otherVal) { ?> ===DONE=== --EXPECT-- ---- testing: 9223372036854775807 % 0 --- -Exception: Division by zero --- testing: 9223372036854775807 % 1 --- int(0) --- testing: 9223372036854775807 % -1 --- @@ -65,8 +61,6 @@ int(7) int(1) --- testing: 9223372036854775807 % 9223372036854775807 --- int(0) ---- testing: -9223372036854775808 % 0 --- -Exception: Division by zero --- testing: -9223372036854775808 % 1 --- int(0) --- testing: -9223372036854775808 % -1 --- @@ -83,8 +77,6 @@ int(-8) int(-2) --- testing: -9223372036854775808 % 9223372036854775807 --- int(-1) ---- testing: 2147483647 % 0 --- -Exception: Division by zero --- testing: 2147483647 % 1 --- int(0) --- testing: 2147483647 % -1 --- @@ -101,8 +93,6 @@ int(23) int(0) --- testing: 2147483647 % 9223372036854775807 --- int(2147483647) ---- testing: -2147483648 % 0 --- -Exception: Division by zero --- testing: -2147483648 % 1 --- int(0) --- testing: -2147483648 % -1 --- @@ -119,8 +109,6 @@ int(-24) int(-1) --- testing: -2147483648 % 9223372036854775807 --- int(-2147483648) ---- testing: 9223372034707292160 % 0 --- -Exception: Division by zero --- testing: 9223372034707292160 % 1 --- int(0) --- testing: 9223372034707292160 % -1 --- @@ -137,8 +125,6 @@ int(28) int(1) --- testing: 9223372034707292160 % 9223372036854775807 --- int(9223372034707292160) ---- testing: -9223372034707292160 % 0 --- -Exception: Division by zero --- testing: -9223372034707292160 % 1 --- int(0) --- testing: -9223372034707292160 % -1 --- @@ -155,8 +141,6 @@ int(-28) int(-1) --- testing: -9223372034707292160 % 9223372036854775807 --- int(-9223372034707292160) ---- testing: 2147483648 % 0 --- -Exception: Division by zero --- testing: 2147483648 % 1 --- int(0) --- testing: 2147483648 % -1 --- @@ -173,8 +157,6 @@ int(24) int(1) --- testing: 2147483648 % 9223372036854775807 --- int(2147483648) ---- testing: -2147483649 % 0 --- -Exception: Division by zero --- testing: -2147483649 % 1 --- int(0) --- testing: -2147483649 % -1 --- @@ -191,8 +173,6 @@ int(-25) int(-2) --- testing: -2147483649 % 9223372036854775807 --- int(-2147483649) ---- testing: 4294967294 % 0 --- -Exception: Division by zero --- testing: 4294967294 % 1 --- int(0) --- testing: 4294967294 % -1 --- @@ -209,8 +189,6 @@ int(2) int(0) --- testing: 4294967294 % 9223372036854775807 --- int(4294967294) ---- testing: 4294967295 % 0 --- -Exception: Division by zero --- testing: 4294967295 % 1 --- int(0) --- testing: 4294967295 % -1 --- @@ -227,8 +205,6 @@ int(3) int(1) --- testing: 4294967295 % 9223372036854775807 --- int(4294967295) ---- testing: 4294967293 % 0 --- -Exception: Division by zero --- testing: 4294967293 % 1 --- int(0) --- testing: 4294967293 % -1 --- @@ -245,8 +221,6 @@ int(1) int(2147483646) --- testing: 4294967293 % 9223372036854775807 --- int(4294967293) ---- testing: 9223372036854775806 % 0 --- -Exception: Division by zero --- testing: 9223372036854775806 % 1 --- int(0) --- testing: 9223372036854775806 % -1 --- @@ -263,8 +237,6 @@ int(6) int(0) --- testing: 9223372036854775806 % 9223372036854775807 --- int(9223372036854775806) ---- testing: 9.2233720368548E+18 % 0 --- -Exception: Division by zero --- testing: 9.2233720368548E+18 % 1 --- int(0) --- testing: 9.2233720368548E+18 % -1 --- @@ -281,8 +253,6 @@ int(-8) int(-2) --- testing: 9.2233720368548E+18 % 9223372036854775807 --- int(-1) ---- testing: -9223372036854775807 % 0 --- -Exception: Division by zero --- testing: -9223372036854775807 % 1 --- int(0) --- testing: -9223372036854775807 % -1 --- @@ -299,8 +269,6 @@ int(-7) int(-1) --- testing: -9223372036854775807 % 9223372036854775807 --- int(0) ---- testing: -9.2233720368548E+18 % 0 --- -Exception: Division by zero --- testing: -9.2233720368548E+18 % 1 --- int(0) --- testing: -9.2233720368548E+18 % -1 --- |
