From: Jani Taskinen Date: Thu, 23 Jul 2009 19:06:56 +0000 (+0000) Subject: - Fixed tests to be more portable X-Git-Tag: php-5.2.11RC1~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cee22e83f0ecc23a29bf57066f4d7a9723c9a97;p=php - Fixed tests to be more portable --- diff --git a/ext/standard/tests/strings/chunk_split_variation2.phpt b/ext/standard/tests/strings/chunk_split_variation2.phpt index 924e6e21ff..7e46b2e8ed 100644 --- a/ext/standard/tests/strings/chunk_split_variation2.phpt +++ b/ext/standard/tests/strings/chunk_split_variation2.phpt @@ -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 diff --git a/ext/standard/tests/strings/chunk_split_variation5.phpt b/ext/standard/tests/strings/chunk_split_variation5.phpt index 69308ea309..4b8b0f8bbc 100644 Binary files a/ext/standard/tests/strings/chunk_split_variation5.phpt and b/ext/standard/tests/strings/chunk_split_variation5.phpt differ diff --git a/ext/standard/tests/strings/chunk_split_variation8.phpt b/ext/standard/tests/strings/chunk_split_variation8.phpt index cc6eeef98c..2ccd48da2f 100644 --- a/ext/standard/tests/strings/chunk_split_variation8.phpt +++ b/ext/standard/tests/strings/chunk_split_variation8.phpt @@ -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 );