Skip to content

Commit

Permalink
Try to fix 32-bit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Apr 2, 2020
1 parent 48de974 commit 0e3dc80
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
9 changes: 8 additions & 1 deletion Zend/tests/decrement_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@ $a = array(
);

foreach ($a as $var) {
$var--;
try {
$var--;
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
var_dump($var);
}

echo "Done\n";
?>
--EXPECTF--
Cannot decrement array
array(3) {
[0]=>
int(1)
Expand All @@ -51,8 +56,10 @@ float(1.5)
NULL
bool(true)
bool(false)
Cannot decrement object
object(stdClass)#%d (0) {
}
Cannot decrement array
array(0) {
}
float(-2147483649)
Expand Down
9 changes: 8 additions & 1 deletion Zend/tests/increment_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@ $a = array(
);

foreach ($a as $var) {
$var++;
try {
$var++;
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
var_dump($var);
}

echo "Done\n";
?>
--EXPECTF--
Cannot decrement array
array(3) {
[0]=>
int(1)
Expand All @@ -51,8 +56,10 @@ float(3.5)
int(1)
bool(true)
bool(false)
Cannot decrement object
object(stdClass)#%d (0) {
}
Cannot decrement array
array(0) {
}
float(2147483648)
Expand Down
4 changes: 1 addition & 3 deletions ext/standard/tests/math/pow_variation1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,7 @@ Warning: A non-numeric value encountered in %s on line %d
int(0)

-- Iteration 23 --

Notice: Object of class classA could not be converted to number in %s on line %d
int(1)
Unsupported operand types: object ** int

-- Iteration 24 --
int(0)
Expand Down

0 comments on commit 0e3dc80

Please sign in to comment.