]> granicus.if.org Git - php/commitdiff
- Fixed tests to be more portable
authorJani Taskinen <jani@php.net>
Thu, 23 Jul 2009 19:06:56 +0000 (19:06 +0000)
committerJani Taskinen <jani@php.net>
Thu, 23 Jul 2009 19:06:56 +0000 (19:06 +0000)
ext/standard/tests/strings/chunk_split_variation2.phpt
ext/standard/tests/strings/chunk_split_variation5.phpt
ext/standard/tests/strings/chunk_split_variation8.phpt

index 924e6e21ff83564c36d71fb55838215553bfa5f7..7e46b2e8edb34e26addd4397c19b7e9b58968865 100644 (file)
@@ -35,10 +35,10 @@ $values = array(
   // float data
   10.5,
   -10.5,
-  10.1234567e10,
-  10.7654321E-10,
+  (float) PHP_INT_MAX + 1,
+  (float) -PHP_INT_MAX - 1,
   .5,
-
   // array data
   array(),
   array(0),
@@ -95,23 +95,23 @@ fclose($fp);
 string(28) "This is ch*uklen vari*ation*"
 -- Iteration 2 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 3 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 4 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 5 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 6 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 7 --
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
@@ -123,52 +123,52 @@ string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 -- Iteration 11 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 12 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 13 --
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 -- Iteration 14 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 15 --
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 -- Iteration 16 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 17 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 18 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 19 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 20 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 21 --
 
-Notice: Object of class MyClass could not be converted to int in %s on line %d
+Notice: Object of class MyClass could not be converted to int in %schunk_split_variation2.php on line %d
 string(50) "T*h*i*s* *i*s* *c*h*u*k*l*e*n* *v*a*r*i*a*t*i*o*n*"
 -- Iteration 22 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 23 --
 
-Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+Warning: chunk_split(): Chunk length should be greater than zero in %schunk_split_variation2.php on line %d
 bool(false)
 -- Iteration 24 --
-string(%d) "%s"
-Done
\ No newline at end of file
+string(30) "This *is ch*uklen* vari*ation*"
+Done
index 69308ea309b284379695ec99b05c83b39902ed8b..4b8b0f8bbc3573ee04b089d0d72b462f9ce923a1 100644 (file)
Binary files a/ext/standard/tests/strings/chunk_split_variation5.phpt and b/ext/standard/tests/strings/chunk_split_variation5.phpt differ
index cc6eeef98c03df4ac7dd744d4c7112b919d90dde..2ccd48da2fdbdb1fe97d2fd712ab76505b640c1e 100644 (file)
@@ -32,9 +32,9 @@ $values = array (
   -123,  //negative integer
   0234,  //octal number
   0x1A,  //hexadecimal number
-  2147483647,  //max positive integer number
-  2147483648,  //max positive integer+1
-  -2147483648,  //min negative integer
+  PHP_INT_MAX,      // max positive integer number
+  PHP_INT_MAX * 3,  // integer overflow
+  -PHP_INT_MAX - 1, // min negative integer
 
 );