Browse Source

fix tests

add test for yet not merged fix
PHAR_1_2
Antony Dovgal 19 years ago
parent
commit
419c5b3db1
  1. 2
      ext/filter/tests/010.phpt
  2. 2
      ext/filter/tests/011.phpt
  3. 2
      ext/filter/tests/bug7715.phpt
  4. 2
      ext/json/tests/bug40503.phpt
  5. 2
      ext/json/tests/pass001.1.phpt
  6. 2
      ext/json/tests/pass001.phpt
  7. 2
      ext/reflection/tests/bug29986.phpt
  8. 1
      ext/standard/tests/array/array_sum.phpt
  9. 128
      ext/standard/tests/array/bug41121.phpt
  10. 2
      ext/standard/tests/file/disk.phpt
  11. 2
      ext/standard/tests/math/constants.phpt
  12. 2
      ext/standard/tests/math/hexdec.phpt
  13. 2
      ext/standard/tests/serialize/bug31442.phpt
  14. 2
      ext/standard/tests/strings/printf.phpt

2
ext/filter/tests/010.phpt

@ -1,5 +1,7 @@
--TEST--
filter_var()
--INI--
precision=14
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--FILE--

2
ext/filter/tests/011.phpt

@ -1,5 +1,7 @@
--TEST--
input_get()
--INI--
precision=14
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--GET--

2
ext/filter/tests/bug7715.phpt

@ -1,5 +1,7 @@
--TEST--
bug 7715, floats value with integer or incomplete input
--INI--
precision=14
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--FILE--

2
ext/json/tests/bug40503.phpt

@ -1,5 +1,7 @@
--TEST--
Bug #40503 (json_encode() value corruption on 32bit systems with overflown values)
--INI--
precision=14
--SKIPIF--
<?php if (!extension_loaded("json")) print "skip"; ?>
--FILE--

2
ext/json/tests/pass001.1.phpt

@ -1,5 +1,7 @@
--TEST--
JSON (http://www.crockford.com/JSON/JSON_checker/test/pass1.json)
--INI--
precision=14
--SKIPIF--
<?php
if (!extension_loaded('json')) die('skip: json extension not available');

2
ext/json/tests/pass001.phpt

@ -1,5 +1,7 @@
--TEST--
JSON (http://www.crockford.com/JSON/JSON_checker/test/pass1.json)
--INI--
precision=14
--SKIPIF--
<?php
if (!extension_loaded('json')) die('skip: json extension not available');

2
ext/reflection/tests/bug29986.phpt

@ -1,5 +1,7 @@
--TEST--
Reflection Bug #29986 (Class constants won't work with predefined constants when using ReflectionClass)
--INI--
precision=14
--SKIPIF--
<?php extension_loaded('reflection') or die('skip'); ?>
--FILE--

1
ext/standard/tests/array/array_sum.phpt

@ -1,6 +1,7 @@
--TEST--
Test array_sum()
--INI--
precision=14
memory_limit=128M
--FILE--
<?php

128
ext/standard/tests/array/bug41121.phpt

@ -0,0 +1,128 @@
--TEST--
Bug #41121 (range() overflow handling for large numbers on 32bit machines)
--INI--
precision=14
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
--FILE--
<?php
// posotive steps
var_dump(range(2147483400, 2147483600, 100));
var_dump( range(2147483646, 2147483648, 1 ) );
var_dump( range(2147483646, 2147483657, 1 ) );
var_dump( range(2147483630, 2147483646, 5 ) );
// negative steps
var_dump( range(-2147483645, -2147483648, 1 ) );
var_dump( range(-2147483645, -2147483649, 1 ) );
var_dump( range(-2147483630, -2147483646, 5 ) );
// low > high
var_dump(range(2147483647, 2147483645, 1 ));
var_dump(range(2147483648, 2147483645, 1 ));
?>
--EXPECT--
array(3) {
[0]=>
int(2147483400)
[1]=>
int(2147483500)
[2]=>
int(2147483600)
}
array(3) {
[0]=>
float(2147483646)
[1]=>
float(2147483647)
[2]=>
float(2147483648)
}
array(12) {
[0]=>
float(2147483646)
[1]=>
float(2147483647)
[2]=>
float(2147483648)
[3]=>
float(2147483649)
[4]=>
float(2147483650)
[5]=>
float(2147483651)
[6]=>
float(2147483652)
[7]=>
float(2147483653)
[8]=>
float(2147483654)
[9]=>
float(2147483655)
[10]=>
float(2147483656)
[11]=>
float(2147483657)
}
array(4) {
[0]=>
int(2147483630)
[1]=>
int(2147483635)
[2]=>
int(2147483640)
[3]=>
int(2147483645)
}
array(4) {
[0]=>
float(-2147483645)
[1]=>
float(-2147483646)
[2]=>
float(-2147483647)
[3]=>
float(-2147483648)
}
array(5) {
[0]=>
float(-2147483645)
[1]=>
float(-2147483646)
[2]=>
float(-2147483647)
[3]=>
float(-2147483648)
[4]=>
float(-2147483649)
}
array(4) {
[0]=>
int(-2147483630)
[1]=>
int(-2147483635)
[2]=>
int(-2147483640)
[3]=>
int(-2147483645)
}
array(3) {
[0]=>
int(2147483647)
[1]=>
int(2147483646)
[2]=>
int(2147483645)
}
array(4) {
[0]=>
float(2147483648)
[1]=>
float(2147483647)
[2]=>
float(2147483646)
[3]=>
float(2147483645)
}

2
ext/standard/tests/file/disk.phpt

@ -1,5 +1,7 @@
--TEST--
disk_total_space() and disk_free_space() tests
--INI--
precision=14
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {

2
ext/standard/tests/math/constants.phpt

@ -1,5 +1,7 @@
--TEST--
Math constants
--INI--
precision=14
--FILE--
<?php
$constants = array(

2
ext/standard/tests/math/hexdec.phpt

@ -1,5 +1,7 @@
--TEST--
overflow check for _php_math_basetozval
--INI--
precision=14
--FILE--
<?php

2
ext/standard/tests/serialize/bug31442.phpt

@ -1,5 +1,7 @@
--TEST--
Bug #31442 (unserialize broken on 64-bit systems)
--INI--
precision=14
--FILE--
<?php
echo unserialize(serialize(2147483648));

2
ext/standard/tests/strings/printf.phpt

@ -1,5 +1,7 @@
--TEST--
Test printf() function (32bit)
--INI--
precision=14
--SKIPIF--
<?php
if (PHP_INT_MAX > 2147483647) {

Loading…
Cancel
Save