Skip to content

Commit

Permalink
Fix bug #80018: Tolerate var_dump() printing floats in exponential no…
Browse files Browse the repository at this point in the history
…tation in tests
  • Loading branch information
nixprime authored and nikic committed Aug 31, 2020
1 parent 5f4b169 commit c8093fe
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion Zend/tests/cast_to_double.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/settype_double.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions ext/standard/tests/file/disk.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions ext/standard/tests/file/disk_free_space_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---
4 changes: 2 additions & 2 deletions ext/standard/tests/file/disk_free_space_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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 --
36 changes: 18 additions & 18 deletions ext/standard/tests/file/disk_free_space_variation.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ext/standard/tests/file/disk_total_space_basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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 --
2 changes: 1 addition & 1 deletion ext/standard/tests/file/disk_total_space_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---
18 changes: 9 additions & 9 deletions ext/standard/tests/file/disk_total_space_variation.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ext/standard/tests/general_functions/type.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c8093fe

Please sign in to comment.