]> granicus.if.org Git - php/commitdiff
fix tests
authorAntony Dovgal <tony2001@php.net>
Thu, 26 Apr 2007 23:42:36 +0000 (23:42 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 26 Apr 2007 23:42:36 +0000 (23:42 +0000)
add test for yet not merged fix

14 files changed:
ext/filter/tests/010.phpt
ext/filter/tests/011.phpt
ext/filter/tests/bug7715.phpt
ext/json/tests/bug40503.phpt
ext/json/tests/pass001.1.phpt
ext/json/tests/pass001.phpt
ext/reflection/tests/bug29986.phpt
ext/standard/tests/array/array_sum.phpt
ext/standard/tests/array/bug41121.phpt [new file with mode: 0644]
ext/standard/tests/file/disk.phpt
ext/standard/tests/math/constants.phpt
ext/standard/tests/math/hexdec.phpt
ext/standard/tests/serialize/bug31442.phpt
ext/standard/tests/strings/printf.phpt

index 0ebf66f231f695853e7eb05abe29fa34f5142d61..e868c10c4c39a2f86216923b63e0327cb0170f48 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 filter_var()
+--INI--
+precision=14
 --SKIPIF--
 <?php if (!extension_loaded("filter")) die("skip"); ?>
 --FILE--
index 5ead90213cc38d82aa629747a5465fddf6fd9763..6a9bf1fa34cce7f0c802253f2ba96255eee7c12d 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 input_get()
+--INI--
+precision=14
 --SKIPIF--
 <?php if (!extension_loaded("filter")) die("skip"); ?>
 --GET--
index 62e0735218aceab62db09919ea4ccff6129abdc6..4298d505d3f8e3a819153a657c11ba7c00648944 100644 (file)
@@ -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--
index d451eea35d01d883e0b80ffb7fa55be04af3f01a..48f18a4e0f55751103b9d88beac766ef84db8a6b 100644 (file)
@@ -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--
index 301ececa8dc0c7e44297d10e4967b0aed932ae99..0fa12d911cf223ceb7b1aff168d287d280ef08a3 100644 (file)
@@ -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');
index a25c4bf48c0df3dd23479df6d3cee843b3a8e86b..c00f30bb3dde8daa31b9078c10b758a27ee0db01 100644 (file)
@@ -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');
index 97f208334857b9176a4094cfca20ba51f6e0fd8e..4c89035dd0bb383e3d9f4a21488f94e843904a88 100644 (file)
@@ -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--
index a483eaae35695c48bdedb640731268842cf1ff87..08aec2155ea70c9c5a7242f682bf469fba476952 100644 (file)
@@ -1,6 +1,7 @@
 --TEST--
 Test array_sum()
 --INI--
+precision=14
 memory_limit=128M
 --FILE--
 <?php
diff --git a/ext/standard/tests/array/bug41121.phpt b/ext/standard/tests/array/bug41121.phpt
new file mode 100644 (file)
index 0000000..a03bdaf
--- /dev/null
@@ -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)
+}
index 7b3f6c0891156e631033b522c70195bcf861caf5..6eef4b4a772a358e1d9b2bba004d89a5068dd86d 100644 (file)
@@ -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') {
index 7b5110f532017dff37354274b1483ed24d6fe66e..deeb785f447ff5a8d46d585c98622c9f0f28b62f 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 Math constants
+--INI--
+precision=14
 --FILE--
 <?php
 $constants = array(
index d8ff71f1ceb5652734a547563b510e13688dadbc..d9e644aafc849a03107b7a7f003c7d1152381fa3 100644 (file)
@@ -1,5 +1,7 @@
 --TEST--
 overflow check for _php_math_basetozval
+--INI--
+precision=14
 --FILE--
 <?php
 
index 3497b278cb1259362f4f2560eb703ebacaf1a8fd..6d451bac975e31ae33099be1faaeabac5c1d1cd7 100755 (executable)
@@ -1,5 +1,7 @@
 --TEST--
 Bug #31442 (unserialize broken on 64-bit systems)
+--INI--
+precision=14
 --FILE--
 <?php
 echo unserialize(serialize(2147483648));
index b5b376284ea0af766429d71dc3dd275f8c61df4d..c6858eea56b01a47419a751b5d02eb5571e11d2b 100755 (executable)
@@ -1,5 +1,7 @@
 --TEST--
 Test printf() function (32bit)
+--INI--
+precision=14
 --SKIPIF--
 <?php
 if (PHP_INT_MAX > 2147483647) {