com php-src: Fix two 32-bit tests for zpp changes: ext/standard /tests/math/bindec_variation1.phpt ext/standard/tests/m ath/hexdec_variation1.phpt
| From: | Nikita Popov | Date: | Wed, 12 Jun 2019 13:47:42 +0000 |
| Subject: | com php-src: Fix two 32-bit tests for zpp changes: ext/standard /tests/math/bindec_variation1.phpt ext/standard/tests/m ath/hexdec_variation1.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106737@lists.php.net to get a copy of this message | ||
Commit: b277548ed567caad1b7c9c22bf049b3f31af94a2
Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 12 Jun 2019 15:47:42 +0200
Parents: 859e3f36f96f2ec755efe0ee69ccf0ed97d844a2
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b277548ed567caad1b7c9c22bf049b3f31af94a2
Log:
Fix two 32-bit tests for zpp changes
Changed paths:
M ext/standard/tests/math/bindec_variation1.phpt
M ext/standard/tests/math/hexdec_variation1.phpt
Diff:
diff --git a/ext/standard/tests/math/bindec_variation1.phpt
b/ext/standard/tests/math/bindec_variation1.phpt
index 6041af1..307d021 100644
--- a/ext/standard/tests/math/bindec_variation1.phpt
+++ b/ext/standard/tests/math/bindec_variation1.phpt
@@ -73,7 +73,11 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump(bindec($input));
+ try {
+ var_dump(bindec($input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$iterator++;
};
fclose($fp);
@@ -134,9 +138,7 @@ int(0)
int(0)
-- Iteration 18 --
-
-Notice: Array to string conversion in %s on line %d
-int(0)
+bindec() expects parameter 1 to be string, array given
-- Iteration 19 --
int(0)
@@ -154,5 +156,5 @@ int(0)
int(0)
-- Iteration 24 --
-int(%d)
+bindec() expects parameter 1 to be string, resource given
===Done===
diff --git a/ext/standard/tests/math/hexdec_variation1.phpt
b/ext/standard/tests/math/hexdec_variation1.phpt
index 00b11d2..5405c72 100644
--- a/ext/standard/tests/math/hexdec_variation1.phpt
+++ b/ext/standard/tests/math/hexdec_variation1.phpt
@@ -77,7 +77,11 @@ $inputs = array(
$iterator = 1;
foreach($inputs as $input) {
echo "\n-- Iteration $iterator --\n";
- var_dump(hexdec($input));
+ try {
+ var_dump(hexdec($input));
+ } catch (TypeError $e) {
+ echo $e->getMessage(), "\n";
+ }
$iterator++;
};
fclose($fp);
@@ -144,9 +148,7 @@ int(0)
int(0)
-- Iteration 20 --
-
-Notice: Array to string conversion in %s on line %d
-int(170)
+hexdec() expects parameter 1 to be string, array given
-- Iteration 21 --
int(2748)
@@ -164,5 +166,5 @@ int(0)
int(0)
-- Iteration 26 --
-%s
+hexdec() expects parameter 1 to be string, resource given
===Done===