php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch 0001-Tolerate-var_dump-printing-floats-in-exponential-not.patch for Testing related Bug #80018Patch version 2020-08-25 20:52 UTC Return to Bug #80018 | Download this patchThis patch renders other patches obsolete Obsolete patches: Patch Revisions:Developer: jamieliu@google.comFrom 09e784665c61f639a9ac0b3b66fb53f3fc9c646a Mon Sep 17 00:00:00 2001 From: Jamie Liu <jamieliu@google.com> Date: Tue, 25 Aug 2020 13:39:43 -0700 Subject: [PATCH] Tolerate var_dump() printing floats in exponential notation in tests. --- Zend/tests/cast_to_double.phpt | 2 +- Zend/tests/settype_double.phpt | 2 +- ext/standard/tests/file/disk.phpt | 4 +-- .../tests/file/disk_free_space_basic.phpt | 10 +++--- .../tests/file/disk_free_space_error.phpt | 4 +-- .../tests/file/disk_free_space_variation.phpt | 36 +++++++++---------- .../tests/file/disk_total_space_basic.phpt | 6 ++-- .../tests/file/disk_total_space_error.phpt | 2 +- .../file/disk_total_space_variation.phpt | 18 +++++----- .../gettype_settype_basic.phpt | 8 ++--- .../tests/general_functions/type.phpt | 6 ++-- 11 files changed, 49 insertions(+), 49 deletions(-) diff --git a/Zend/tests/cast_to_double.phpt b/Zend/tests/cast_to_double.phpt index 6151c00f84b8..58286436bd29 100644 --- a/Zend/tests/cast_to_double.phpt +++ b/Zend/tests/cast_to_double.phpt @@ -50,7 +50,7 @@ float(1) float(0) float(1) float(0) -float(%d) +float(%f) Notice: Object of class test could not be converted to float in %s on line %d float(1) diff --git a/Zend/tests/settype_double.phpt b/Zend/tests/settype_double.phpt index 8c74a95b14c2..d5b2f0e42ea9 100644 --- a/Zend/tests/settype_double.phpt +++ b/Zend/tests/settype_double.phpt @@ -50,7 +50,7 @@ float(1) float(0) float(1) float(0) -float(%d) +float(%f) Notice: Object of class test could not be converted to float in %s on line %d float(1) diff --git a/ext/standard/tests/file/disk.phpt b/ext/standard/tests/file/disk.phpt index 424de1f6ba8a..359b2c02b9b7 100644 --- a/ext/standard/tests/file/disk.phpt +++ b/ext/standard/tests/file/disk.phpt @@ -30,8 +30,8 @@ bool(false) Warning: disk_total_space(): No such file or directory in %s on line %d bool(false) -float(%d) -float(%d) +float(%f) +float(%f) Warning: disk_free_space(): No such file or directory in %s on line %d bool(false) diff --git a/ext/standard/tests/file/disk_free_space_basic.phpt b/ext/standard/tests/file/disk_free_space_basic.phpt index 29b2cefed90b..1590b71123f9 100644 --- a/ext/standard/tests/file/disk_free_space_basic.phpt +++ b/ext/standard/tests/file/disk_free_space_basic.phpt @@ -50,18 +50,18 @@ rmdir($file_path."/disk_free_space"); ?> --EXPECTF-- *** Testing with existing directory *** -float(%d) -float(%d) +float(%f) +float(%f) *** Testing with newly created directory *** Free Space before writing to a file -float(%d) +float(%f) Free Space after writing to a file -float(%d) +float(%f) Free Space Value Is Correct *** Testing with Binary Input *** -float(%d) +float(%f) --- Done --- diff --git a/ext/standard/tests/file/disk_free_space_error.phpt b/ext/standard/tests/file/disk_free_space_error.phpt index 62dd8c40eea9..3bec04bb814b 100644 --- a/ext/standard/tests/file/disk_free_space_error.phpt +++ b/ext/standard/tests/file/disk_free_space_error.phpt @@ -35,7 +35,7 @@ bool(false) Warning: diskfreespace(): No such file or directory in %s on line %d bool(false) -float(%d) -float(%d) +float(%f) +float(%f) -- Done -- diff --git a/ext/standard/tests/file/disk_free_space_variation.phpt b/ext/standard/tests/file/disk_free_space_variation.phpt index d5adb3221381..b68bd34211dd 100644 --- a/ext/standard/tests/file/disk_free_space_variation.phpt +++ b/ext/standard/tests/file/disk_free_space_variation.phpt @@ -63,44 +63,44 @@ rmdir($file_path."/disk_free_space_variation"); ?> --EXPECTF-- *** Testing with a directory *** -float(%d) -float(%d) +float(%f) +float(%f) Testing for the return type *** bool(true) *** Testing with different directory combinations *** -- Iteration 1 -- -float(%d) -float(%d) +float(%f) +float(%f) -- Iteration 2 -- -float(%d) -float(%d) +float(%f) +float(%f) -- Iteration 3 -- -float(%d) -float(%d) +float(%f) +float(%f) -- Iteration 4 -- -float(%d) -float(%d) +float(%f) +float(%f) -- Iteration 5 -- -float(%d) -float(%d) +float(%f) +float(%f) -- Iteration 6 -- -float(%d) -float(%d) +float(%f) +float(%f) -- Iteration 7 -- -float(%d) -float(%d) +float(%f) +float(%f) -- Iteration 8 -- -float(%d) -float(%d) +float(%f) +float(%f) -- Iteration 9 -- disk_free_space(): Argument #1 ($directory) must be a valid path, string given diff --git a/ext/standard/tests/file/disk_total_space_basic.phpt b/ext/standard/tests/file/disk_total_space_basic.phpt index 0bb6159a40e1..e565527d8814 100644 --- a/ext/standard/tests/file/disk_total_space_basic.phpt +++ b/ext/standard/tests/file/disk_total_space_basic.phpt @@ -32,11 +32,11 @@ rmdir($file_path."/disk_total_space"); ?> --EXPECTF-- *** Testing with normal directory *** -float(%d) +float(%f) *** Testing with newly created directory *** -float(%d) +float(%f) Total Space after writing to a file -float(%d) +float(%f) -- Done -- diff --git a/ext/standard/tests/file/disk_total_space_error.phpt b/ext/standard/tests/file/disk_total_space_error.phpt index e4bd31fa5d97..88e6252adf95 100644 --- a/ext/standard/tests/file/disk_total_space_error.phpt +++ b/ext/standard/tests/file/disk_total_space_error.phpt @@ -31,6 +31,6 @@ unlink($file_path."/disk_total_space.tmp"); Warning: disk_total_space(): No such file or directory in %s on line %d bool(false) -float(%d) +float(%f) --- Done --- diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt index da09238ecca2..a7578c486e0d 100644 --- a/ext/standard/tests/file/disk_total_space_variation.phpt +++ b/ext/standard/tests/file/disk_total_space_variation.phpt @@ -64,35 +64,35 @@ rmdir($file_path."/disk_total_space"); ?> --EXPECTF-- *** Testing with a directory *** -float(%d) +float(%f) Testing for the return type *** bool(true) *** Testing with different directory combinations *** -- Iteration 1 -- -float(%d) +float(%f) -- Iteration 2 -- -float(%d) +float(%f) -- Iteration 3 -- -float(%d) +float(%f) -- Iteration 4 -- -float(%d) +float(%f) -- Iteration 5 -- -float(%d) +float(%f) -- Iteration 6 -- -float(%d) +float(%f) -- Iteration 7 -- -float(%d) +float(%f) -- Iteration 8 -- -float(%d) +float(%f) -- Iteration 9 -- disk_total_space(): Argument #1 ($directory) must be a valid path, string given diff --git a/ext/standard/tests/general_functions/gettype_settype_basic.phpt b/ext/standard/tests/general_functions/gettype_settype_basic.phpt index 932ed7a9671b..0c336f8a2367 100644 --- a/ext/standard/tests/general_functions/gettype_settype_basic.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_basic.phpt @@ -348,11 +348,11 @@ float(0) string(6) "double" -- Iteration 12 -- bool(true) -float(%d) +float(%f) string(6) "double" -- Iteration 13 -- bool(true) -float(%d) +float(%f) string(6) "double" -- Iteration 14 -- 8: Object of class point could not be converted to float @@ -407,11 +407,11 @@ float(0) string(6) "double" -- Iteration 12 -- bool(true) -float(%d) +float(%f) string(6) "double" -- Iteration 13 -- bool(true) -float(%d) +float(%f) string(6) "double" -- Iteration 14 -- 8: Object of class point could not be converted to float diff --git a/ext/standard/tests/general_functions/type.phpt b/ext/standard/tests/general_functions/type.phpt index a32e4b44a1d0..a43640f09eba 100644 --- a/ext/standard/tests/general_functions/type.phpt +++ b/ext/standard/tests/general_functions/type.phpt @@ -132,12 +132,12 @@ float(0) bool(true) float(0) bool(true) -float(%d) +float(%f) bool(true) -float(%d) +float(%f) string(56) "Object of class stdClass could not be converted to float" bool(true) -float(%d) +float(%f) bool(true) bool(true) bool(true) -- 2.28.0.297.g1956fa8f8d-goog |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Apr 18 06:01:28 2024 UTC |