]> granicus.if.org Git - php/commitdiff
fix tests: better float values
authorRaghubansh Kumar <kraghuba@php.net>
Fri, 9 Nov 2007 07:19:00 +0000 (07:19 +0000)
committerRaghubansh Kumar <kraghuba@php.net>
Fri, 9 Nov 2007 07:19:00 +0000 (07:19 +0000)
14 files changed:
ext/standard/tests/strings/chunk_split_variation1.phpt
ext/standard/tests/strings/chunk_split_variation2.phpt
ext/standard/tests/strings/chunk_split_variation3.phpt
ext/standard/tests/strings/crc32_variation1.phpt
ext/standard/tests/strings/strcspn_variation1.phpt
ext/standard/tests/strings/strcspn_variation2.phpt
ext/standard/tests/strings/strcspn_variation3.phpt
ext/standard/tests/strings/strcspn_variation4.phpt
ext/standard/tests/strings/strspn_variation1.phpt
ext/standard/tests/strings/strspn_variation2.phpt
ext/standard/tests/strings/strspn_variation3.phpt
ext/standard/tests/strings/strspn_variation4.phpt
ext/standard/tests/strings/strtok_variation1.phpt
ext/standard/tests/strings/ucwords_variation1.phpt

index 58cb0515c33c25ea66e865fb7a1866dc64094538..624587cedaa9b8af74dcbd9c0afad21b00b7df61 100644 (file)
@@ -42,8 +42,8 @@ $values = array(
   // float data
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.1234567e10,
+  10.7654321E-10,
   .5,
 
   // array data
@@ -111,30 +111,30 @@ string(6) "10 .5 "
 -- Iteration 6 --
 string(8) "-1 0. 5 "
 -- Iteration 7 --
-string(18) "10 50 00 00 00 00 "
+string(18) "10 12 34 56 70 00 "
 -- Iteration 8 --
-string(11) "1. 06 E- 9 "
+string(20) "1. 07 65 43 21 E- 9 "
 -- Iteration 9 --
 string(5) "0. 5 "
 -- Iteration 10 --
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in %s on line 87
 string(8) "Ar ra y "
 -- Iteration 11 --
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in %s on line 87
 string(8) "Ar ra y "
 -- Iteration 12 --
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in %s on line 87
 string(8) "Ar ra y "
 -- Iteration 13 --
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in %s on line 87
 string(8) "Ar ra y "
 -- Iteration 14 --
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in %s on line 87
 string(8) "Ar ra y "
 -- Iteration 15 --
 string(1) " "
@@ -163,5 +163,5 @@ string(1) " "
 -- Iteration 27 --
 string(1) " "
 -- Iteration 28 --
-string(%d) "Re so ur ce  i d  #%d "
-Done
+string(%d) "Re so ur ce  i d  #%s "
+Done
\ No newline at end of file
index 3498f5fce61870fdc68a3df021aa8a800966ffb2..924e6e21ff83564c36d71fb55838215553bfa5f7 100644 (file)
@@ -35,8 +35,8 @@ $values = array(
   // float data
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.1234567e10,
+  10.7654321E-10,
   .5,
 
   // array data
@@ -98,7 +98,9 @@ string(28) "This is ch*uklen vari*ation*"
 Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 3 --
-string(26) "This is chuklen variation*"
+
+Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
+bool(false)
 -- Iteration 4 --
 
 Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
@@ -168,5 +170,5 @@ bool(false)
 Warning: chunk_split(): Chunk length should be greater than zero in %s on line %d
 bool(false)
 -- Iteration 24 --
-string(30) "This *is ch*uklen* vari*ation*"
-Done
+string(%d) "%s"
+Done
\ No newline at end of file
index 00dbbdeee46da6f91f2d71c3b54713d01bc6611c..f314990c791958157beab48e50337d65f1f5e429 100644 (file)
@@ -42,8 +42,8 @@ $values = array(
   // float data
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.123456e10,
+  10.7654321E-10,
   .5,
 
   // array data
@@ -106,9 +106,9 @@ string(46) "This10.5 is 10.5simp10.5le s10.5trin10.5g.10.5"
 -- Iteration 6 --
 string(52) "This-10.5 is -10.5simp-10.5le s-10.5trin-10.5g.-10.5"
 -- Iteration 7 --
-string(94) "This105000000000 is 105000000000simp105000000000le s105000000000trin105000000000g.105000000000"
+string(94) "This101234560000 is 101234560000simp101234560000le s101234560000trin101234560000g.101234560000"
 -- Iteration 8 --
-string(64) "This1.06E-9 is 1.06E-9simp1.06E-9le s1.06E-9trin1.06E-9g.1.06E-9"
+string(100) "This1.07654321E-9 is 1.07654321E-9simp1.07654321E-9le s1.07654321E-9trin1.07654321E-9g.1.07654321E-9"
 -- Iteration 9 --
 string(40) "This0.5 is 0.5simp0.5le s0.5trin0.5g.0.5"
 -- Iteration 10 --
@@ -155,4 +155,4 @@ string(22) "This is simple string."
 string(22) "This is simple string."
 -- Iteration 26 --
 string(%d) "ThisResource id #%d is Resource id #%dsimpResource id #%dle sResource id #%dtrinResource id #%dg.Resource id #%d"
-Done
+Done
\ No newline at end of file
index de7ca5d25a63a7e8bd3b27711b28d97ea1a9b90a..cfd477909125e7630cc9801cc3e0887d632829a7 100644 (file)
@@ -46,8 +46,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -90,6 +90,7 @@ $count = 1;
 foreach($values as $value) {
       echo "\n-- Iteration $count --\n";
       var_dump( crc32($value) );
+      $count++;
 };
 
 // closing the resource
@@ -107,90 +108,90 @@ Notice: Undefined variable: unset_var in %s on line %d
 -- Iteration 1 --
 int(-186917087)
 
--- Iteration 1 --
+-- Iteration 2 --
 int(-2082672713)
 
--- Iteration 1 --
+-- Iteration 3 --
 int(-873121252)
 
--- Iteration 1 --
+-- Iteration 4 --
 int(1860518047)
 
--- Iteration 1 --
+-- Iteration 5 --
 int(269248583)
 
--- Iteration 1 --
+-- Iteration 6 --
 int(-834950157)
 
--- Iteration 1 --
-int(-638440228)
+-- Iteration 7 --
+int(-965354630)
 
--- Iteration 1 --
-int(-742287383)
+-- Iteration 8 --
+int(1376932222)
 
--- Iteration 1 --
+-- Iteration 9 --
 int(-2036403827)
 
--- Iteration 1 --
+-- Iteration 10 --
 
 Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration 1 --
+-- Iteration 11 --
 
 Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration 1 --
+-- Iteration 12 --
 
 Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration 1 --
+-- Iteration 13 --
 
 Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration 1 --
+-- Iteration 14 --
 
 Warning: crc32() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration 1 --
+-- Iteration 15 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 16 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 17 --
 int(-2082672713)
 
--- Iteration 1 --
+-- Iteration 18 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 19 --
 int(-2082672713)
 
--- Iteration 1 --
+-- Iteration 20 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 21 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 22 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 23 --
 int(-1465013268)
 
--- Iteration 1 --
+-- Iteration 24 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 25 --
 int(0)
 
--- Iteration 1 --
+-- Iteration 26 --
 
 Warning: crc32() expects parameter 1 to be string, resource given in %s on line %d
 NULL
-Done
+Done
\ No newline at end of file
index f80e4615e203545679d320ed400b632ceb53bd59..219a12c4bfbda3204a7eb412beca3493d8a57dbf 100644 (file)
@@ -9,6 +9,7 @@ Test strcspn() function : usage variations - unexpected values for str argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
 
 /*
 * Testing strspn() : with different unexpected values for str argument
@@ -49,8 +50,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -90,7 +91,7 @@ $values = array(
 // loop through each element of the array for str
 
 foreach($values as $value) {
-      echo "\n-- Iteration with str value as \"$value\" \n";
+      echo "\n-- Iteration with str value as \"$value\"\n";
       var_dump( strcspn($value,$mask) ); // with default args
       var_dump( strcspn($value,$mask,$start) );  // with default len value
       var_dump( strcspn($value,$mask,$start,$len) );  //  with all args
@@ -104,56 +105,52 @@ echo "Done"
 --EXPECTF--
 *** Testing strcspn() : with unexpected values for str argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with str value as "0" 
+-- Iteration with str value as "0"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "12345" 
+-- Iteration with str value as "12345"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "-2345" 
+-- Iteration with str value as "-2345"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "10.5" 
+-- Iteration with str value as "10.5"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "-10.5" 
+-- Iteration with str value as "-10.5"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "105000000000" 
+-- Iteration with str value as "101234567000"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "1.06E-9" 
+-- Iteration with str value as "1.07654321E-9"
 int(0)
 int(1)
 int(1)
 
--- Iteration with str value as "0.5" 
+-- Iteration with str value as "0.5"
 int(0)
 int(1)
 int(1)
 
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
@@ -164,7 +161,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
@@ -175,7 +172,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
@@ -186,7 +183,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
@@ -197,7 +194,7 @@ NULL
 Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
@@ -208,62 +205,62 @@ NULL
 Warning: strcspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "object" 
+-- Iteration with str value as "object"
 int(0)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "Resource id #%d" 
+-- Iteration with str value as "Resource id #%d"
 
 Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
 NULL
@@ -273,4 +270,4 @@ NULL
 
 Warning: strcspn() expects parameter 1 to be string, resource given in %s on line %d
 NULL
-Done
+Done
\ No newline at end of file
index df79e9afd61d03bbffe2626f58ad5d611fc10d4f..cb7544c2a92173393ad9cce3aa7a5a1b50a9e9c0 100644 (file)
@@ -9,6 +9,8 @@ Test strcspn() function : usage variations - unexpected values for mask argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strcspn() : with different unexpected values for mask argument
 */
@@ -47,8 +49,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -88,7 +90,7 @@ $values = array(
 // loop through each element of the array for mask
 
 foreach($values as $value) {
-      echo "\n-- Iteration with mask value as \"$value\" -- \n";
+      echo "\n-- Iteration with mask value as \"$value\" --\n";
       var_dump( strcspn($str,$value) );  // with defalut args
       var_dump( strcspn($str,$value,$start) );  // with default len value
       var_dump( strcspn($str,$value,$start,$len) );  // with all args
@@ -102,56 +104,52 @@ echo "Done"
 --EXPECTF--
 *** Testing strcspn() : with diferent unexpected values of mask argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with mask value as "0" -- 
+-- Iteration with mask value as "0" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "12345" -- 
+-- Iteration with mask value as "12345" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "-2345" -- 
+-- Iteration with mask value as "-2345" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "10.5" -- 
+-- Iteration with mask value as "10.5" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "-10.5" -- 
+-- Iteration with mask value as "-10.5" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "105000000000" -- 
+-- Iteration with mask value as "101234567000" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "1.06E-9" -- 
+-- Iteration with mask value as "1.07654321E-9" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "0.5" -- 
+-- Iteration with mask value as "0.5" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
@@ -162,7 +160,7 @@ NULL
 Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
@@ -173,7 +171,7 @@ NULL
 Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
@@ -184,7 +182,7 @@ NULL
 Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
@@ -195,7 +193,7 @@ NULL
 Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
@@ -206,62 +204,62 @@ NULL
 Warning: strcspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "object" -- 
+-- Iteration with mask value as "object" --
 int(1)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(10)
 int(9)
 int(9)
 
--- Iteration with mask value as "Resource id #%d" -- 
+-- Iteration with mask value as "Resource id #%d" --
 
 Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
 NULL
@@ -271,4 +269,4 @@ NULL
 
 Warning: strcspn() expects parameter 2 to be string, resource given in %s on line %d
 NULL
-Done
+Done
\ No newline at end of file
index 869f46537c316cae936b8dbf7b4f28f59e40dd91..f64cad378886a85568e1e115d5576b3a1db6e703 100644 (file)
@@ -9,6 +9,8 @@ Test strcspn() function : usage variations - unexpected values of start argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strcspn() : with unexpected values of start argument
 */
@@ -41,8 +43,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -99,10 +101,6 @@ echo "Done"
 --EXPECTF--
 *** Testing strcspn() : with unexpected values of start argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with start value as "10.5" --
 int(0)
 int(0)
@@ -111,11 +109,11 @@ int(0)
 int(0)
 int(0)
 
--- Iteration with start value as "105000000000" --
-bool(false)
-bool(false)
+-- Iteration with start value as "101234567000" --
+int(0)
+int(0)
 
--- Iteration with start value as "1.06E-9" --
+-- Iteration with start value as "1.07654321E-9" --
 int(0)
 int(0)
 
@@ -125,7 +123,7 @@ int(0)
 
 -- Iteration with start value as "Array" --
 
-Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
+Warning: strcspn() expects parameter 3 to be long, array given in %s on line 89
 NULL
 
 Warning: strcspn() expects parameter 3 to be long, array given in %s on line %d
@@ -242,4 +240,4 @@ NULL
 
 Warning: strcspn() expects parameter 3 to be long, resource given in %s on line %d
 NULL
-Done
+Done
\ No newline at end of file
index 6ea48219cf1919a4d79f527b7095c5b8ef8a493d..d456a23318f5181e5fbbc0dbb4fc15c32361fea9 100644 (file)
@@ -9,6 +9,8 @@ Test strcspn() function : usage variations - unexpected values of len argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strcspn() : with unexpected values of len argument
 */
@@ -41,8 +43,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -98,20 +100,16 @@ echo "Done"
 --EXPECTF--
 *** Testing strcspn() : with unexpected values of len argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with len value as "10.5" --
 int(0)
 
 -- Iteration with len value as "-10.5" --
 int(0)
 
--- Iteration with len value as "105000000000" --
+-- Iteration with len value as "101234567000" --
 int(0)
 
--- Iteration with len value as "1.06E-9" --
+-- Iteration with len value as "1.07654321E-9" --
 int(0)
 
 -- Iteration with len value as "0.5" --
@@ -195,4 +193,4 @@ int(0)
 
 Warning: strcspn() expects parameter 4 to be long, resource given in %s on line %d
 NULL
-Done
+Done
\ No newline at end of file
index 513046b62dc044a862f399e1649006e09d21ac7d..45e71edc28a950cd8195bc0d331cb9db0bd504d2 100644 (file)
@@ -9,6 +9,8 @@ Test strspn() function : usage variations  - unexpected values for str argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strspn() : with different unexpected values for str argument
 */
@@ -48,8 +50,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -89,7 +91,7 @@ $values = array(
 // loop through each element of the array for str
 
 foreach($values as $value) {
-      echo "\n-- Iteration with str value as \"$value\" \n";
+      echo "\n-- Iteration with str value as \"$value\"\n";
       var_dump( strspn($value,$mask) ); // with default args
       var_dump( strspn($value,$mask,$start) );  // with default len value
       var_dump( strspn($value,$mask,$start,$len) );  //  with all args
@@ -103,56 +105,52 @@ echo "Done"
 --EXPECTF--
 *** Testing strspn() : with unexpected values for str argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with str value as "0" 
+-- Iteration with str value as "0"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "12345" 
+-- Iteration with str value as "12345"
 int(5)
 int(4)
 int(4)
 
--- Iteration with str value as "-2345" 
+-- Iteration with str value as "-2345"
 int(0)
 int(4)
 int(4)
 
--- Iteration with str value as "10.5" 
+-- Iteration with str value as "10.5"
 int(2)
 int(1)
 int(1)
 
--- Iteration with str value as "-10.5" 
+-- Iteration with str value as "-10.5"
 int(0)
 int(2)
 int(2)
 
--- Iteration with str value as "105000000000" 
+-- Iteration with str value as "101234567000"
 int(12)
 int(11)
 int(10)
 
--- Iteration with str value as "1.06E-9" 
+-- Iteration with str value as "1.07654321E-9"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "0.5" 
+-- Iteration with str value as "0.5"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
@@ -163,7 +161,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
@@ -174,7 +172,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
@@ -185,7 +183,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
@@ -196,7 +194,7 @@ NULL
 Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration with str value as "Array" 
+-- Iteration with str value as "Array"
 
 Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
@@ -207,62 +205,62 @@ NULL
 Warning: strspn() expects parameter 1 to be string, array given in %s on line %d
 NULL
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "1" 
+-- Iteration with str value as "1"
 int(1)
 int(0)
 int(0)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "object" 
+-- Iteration with str value as "object"
 int(2)
 int(1)
 int(1)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "" 
+-- Iteration with str value as ""
 int(0)
 bool(false)
 bool(false)
 
--- Iteration with str value as "Resource id #%d" 
+-- Iteration with str value as "Resource id #%d"
 
 Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
 NULL
@@ -272,4 +270,4 @@ NULL
 
 Warning: strspn() expects parameter 1 to be string, resource given in %s on line %d
 NULL
-Done
+Done
\ No newline at end of file
index b8891a5909694d231ee7c06f8dc1e20b4c15fe16..7af61e559ae92f81e210582e84d90565259fb8ad 100644 (file)
@@ -9,6 +9,8 @@ Test strspn() function : usage variations - unexpected values for mask argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strspn() : with different unexpected values for mask argument
 */
@@ -47,8 +49,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -88,7 +90,7 @@ $values = array(
 // loop through each element of the array for mask
 
 foreach($values as $value) {
-      echo "\n-- Iteration with mask value as \"$value\" -- \n";
+      echo "\n-- Iteration with mask value as \"$value\" --\n";
       var_dump( strspn($str,$value) );  // with defalut args
       var_dump( strspn($str,$value,$start) );  // with default len value
       var_dump( strspn($str,$value,$start,$len) );  // with all args
@@ -102,56 +104,52 @@ echo "Done"
 --EXPECTF--
 *** Testing strspn() : with diferent unexpected values of mask argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
--- Iteration with mask value as "0" -- 
+-- Iteration with mask value as "0" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "12345" -- 
+-- Iteration with mask value as "12345" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "-2345" -- 
+-- Iteration with mask value as "-2345" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "10.5" -- 
+-- Iteration with mask value as "10.5" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "-10.5" -- 
+-- Iteration with mask value as "-10.5" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "105000000000" -- 
+-- Iteration with mask value as "101234567000" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1.06E-9" -- 
+-- Iteration with mask value as "1.07654321E-9" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "0.5" -- 
+-- Iteration with mask value as "0.5" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
@@ -162,7 +160,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
@@ -173,7 +171,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
@@ -184,7 +182,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
@@ -195,7 +193,7 @@ NULL
 Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
 
--- Iteration with mask value as "Array" -- 
+-- Iteration with mask value as "Array" --
 
 Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
@@ -206,62 +204,62 @@ NULL
 Warning: strspn() expects parameter 2 to be string, array given in %s on line %d
 NULL
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "1" -- 
+-- Iteration with mask value as "1" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "object" -- 
+-- Iteration with mask value as "object" --
 int(0)
 int(1)
 int(1)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "" -- 
+-- Iteration with mask value as "" --
 int(0)
 int(0)
 int(0)
 
--- Iteration with mask value as "Resource id #%d" -- 
+-- Iteration with mask value as "Resource id #%d" --
 
 Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d
 NULL
@@ -271,4 +269,4 @@ NULL
 
 Warning: strspn() expects parameter 2 to be string, resource given in %s on line %d
 NULL
-Done
+Done
\ No newline at end of file
index 0773bd3ad3f04dbb2f52a2f356967fade03bf5aa..3701cde1877de21babee86d1b7ac62480dd4b2a2 100644 (file)
@@ -9,6 +9,8 @@ Test strspn() function : usage variations - unexpected values of start argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strspn() : with unexpected values of start argument
 */
@@ -41,8 +43,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -99,10 +101,6 @@ echo "Done"
 --EXPECTF--
 *** Testing strspn() : with unexpected values of start argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with start value as "10.5" --
 int(0)
 int(0)
@@ -111,11 +109,11 @@ int(0)
 int(2)
 int(2)
 
--- Iteration with start value as "105000000000" --
-bool(false)
-bool(false)
+-- Iteration with start value as "101234567000" --
+int(2)
+int(2)
 
--- Iteration with start value as "1.06E-9" --
+-- Iteration with start value as "1.07654321E-9" --
 int(2)
 int(2)
 
@@ -242,4 +240,4 @@ NULL
 
 Warning: strspn() expects parameter 3 to be long, resource given in %s on line %d
 NULL
-Done
+Done
\ No newline at end of file
index dd21a1d0fa7e05d665e1e1b156f2f32ddf5a8af5..5bd3894414ac4bc4bd9ef21ef8c7607c58af70d5 100644 (file)
@@ -9,6 +9,8 @@ Test strspn() function : usage variations - unexpected values of len argument
  * Alias to functions: none
 */
 
+error_reporting(E_ALL & ~E_NOTICE);
+
 /*
 * Testing strspn() : with unexpected values of len argument
 */
@@ -41,8 +43,8 @@ $values = array(
       // float data
       10.5,
       -10.5,
-      10.5e10,
-      10.6E-10,
+      10.1234567e10,
+      10.7654321E-10,
       .5,
 
       // array data
@@ -98,20 +100,16 @@ echo "Done"
 --EXPECTF--
 *** Testing strspn() : with unexpected values of len argument ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
 -- Iteration with len value as "10.5" --
 int(2)
 
 -- Iteration with len value as "-10.5" --
 int(0)
 
--- Iteration with len value as "105000000000" --
-int(2)
+-- Iteration with len value as "101234567000" --
+int(0)
 
--- Iteration with len value as "1.06E-9" --
+-- Iteration with len value as "1.07654321E-9" --
 int(0)
 
 -- Iteration with len value as "0.5" --
@@ -195,4 +193,4 @@ int(0)
 
 Warning: strspn() expects parameter 4 to be long, resource given in %s on line %d
 NULL
-Done
+Done
\ No newline at end of file
index 3c754c88a68c097700fdcb8787660d92efa41b61..c23b3873fac060cef7dfa891e681ed34fce25c91 100644 (file)
@@ -41,8 +41,8 @@ $values =  array (
   // float values
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.1234567e10,
+  10.7654321E-10,
   .5,
 
   // array values
@@ -120,9 +120,9 @@ string(4) "10.5"
 -- Iteration 6 --
 string(4) "10.5"
 -- Iteration 7 --
-string(12) "105000000000"
+string(12) "101234567000"
 -- Iteration 8 --
-string(5) "1.06E"
+string(11) "1.07654321E"
 -- Iteration 9 --
 string(3) "0.5"
 -- Iteration 10 --
@@ -169,4 +169,4 @@ bool(false)
 bool(false)
 -- Iteration 26 --
 string(%d) "Resource id #%d"
-Done
+Done
\ No newline at end of file
index 2a3ceeeb8002518caa2e2c1c3dd09b1de0af4a7a..b7d61ab5da0e3a6f938e54b5ba6f5c4a9f246c53 100644 (file)
@@ -49,8 +49,8 @@ $values =  array (
   // float values
   10.5,
   -10.5,
-  10.5e10,
-  10.6E-10,
+  10.1234567e10,
+  10.7654321E-10,
   .5,
 
   // array values
@@ -139,9 +139,9 @@ string(4) "10.5"
 -- Iteration 12 --
 string(5) "-10.5"
 -- Iteration 13 --
-string(12) "105000000000"
+string(12) "101234567000"
 -- Iteration 14 --
-string(7) "1.06E-9"
+string(13) "1.07654321E-9"
 -- Iteration 15 --
 string(3) "0.5"
 -- Iteration 16 --
@@ -162,7 +162,7 @@ Notice: Array to string conversion in %s on line %d
 string(5) "Array"
 -- Iteration 20 --
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in %s on line 101
 string(5) "Array"
 -- Iteration 21 --
 string(1) "1"
@@ -196,4 +196,4 @@ string(0) ""
 string(0) ""
 -- Iteration 36 --
 string(%d) "Resource Id #%d"
-Done
+Done
\ No newline at end of file