From 5e562853ffea3220042b1c43add98ff74a7583f6 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Wed, 18 Jun 2008 23:45:36 +0000 Subject: [PATCH] fix tests for builtin Zend functions using new parsing API --- ext/standard/tests/array/each.phpt | Bin 9548 -> 9570 bytes ext/standard/tests/array/each_error.phpt | 4 +- .../class_object/get_class_error_001.phpt | 2 +- .../get_class_methods_error_001.phpt | 4 +- .../class_object/get_class_variation_001.phpt | 104 +++++++++++++----- .../get_object_vars_error_001.phpt | 4 +- .../get_object_vars_variation_003.phpt | 104 +++++++++++++----- .../get_parent_class_error_001.phpt | 2 +- .../tests/class_object/is_a_error_001.phpt | 4 +- .../class_object/is_a_variation_002.phpt | 70 ++++++------ .../is_subclass_of_error_001.phpt | 4 +- .../is_subclass_of_variation_002.phpt | 27 +++-- .../class_object/method_exists_error_001.phpt | 4 +- .../method_exists_variation_002.phpt | 25 ++--- .../tests/general_functions/bug41970.phpt | 8 +- ext/standard/tests/strings/strcasecmp.phpt | Bin 22190 -> 22268 bytes ext/standard/tests/strings/strcmp.phpt | Bin 19960 -> 20034 bytes ext/standard/tests/strings/strlen.phpt | Bin 7030 -> 7090 bytes .../tests/strings/strncasecmp_error.phpt | 8 +- .../strings/strncasecmp_variation10.phpt | 36 +++--- .../strings/strncasecmp_variation11.phpt | 38 ++++--- .../tests/strings/strncasecmp_variation4.phpt | 46 ++++---- .../tests/strings/strncasecmp_variation5.phpt | 36 ++++-- ext/standard/tests/strings/strncmp_error.phpt | 8 +- .../tests/strings/strncmp_variation4.phpt | 46 ++++---- .../tests/strings/strncmp_variation5.phpt | 36 ++++-- 26 files changed, 375 insertions(+), 245 deletions(-) diff --git a/ext/standard/tests/array/each.phpt b/ext/standard/tests/array/each.phpt index 1953a04397dca63132130da77335de8a377b81e7..19ee728fd2ee51d8dced3b1ae18aab8e60dba706 100644 GIT binary patch delta 121 zcmX@(^~h_(Wo7Nu#N-SOO@-8og4E=aVj!KET#{3%V5m@#Sd^HXT9R6%qhO$ro>`Wf dH`zc{eDZu1E~4}pq3Brw)EC0)lAo8#1ptM~D%t=5 delta 85 zcmaFlb;fJMWo3o%qWrvcg@VMQ#N5=9)FOrC{L;JQC&d6{|XRtm)>MahZ9smZwo8k!2J6$PouCB+H_iA9OIsU@jJ z3PuVg`3gy?AZ0-1ItqzJMTwOP>6vAzc?y|%3aZ5l`FRRCnR%%SswrH4p*}v74MN2> zF9_ylGQw(dYDHplNlqouT(}*@Itm656DMB`l_5o&A;sD}NpPewE^oW!=cRH106_tJ AwEzGB delta 251 zcmeyfmT}!$#tr_#ihlVenaQbE3XVlZiIoZ^`3l7)MVWc&3d#9-WvNBQnfa3^1`AJq z5W+J#I8<=+zF=-9weX^Rpn`(LqQud)f zwIVUOB&QN+9^C9=9R&kiCUN0*8+MZnQB0~waukI|k!2DeDC~g#GlsZo@!hw;a3#tkdIjQ#RUGLuuS6da3+5-Sx-@)e3piZb)k6_WGw%2JDpGxPHlGV>Hv zixq&3oXosb1=W^yveZ0<%sd6vVuk!Xg`CX1R0Y)(F27J8pUn!A3mJ7WOiZmv fOfJc(1eymoTSvhFV$ftoX&EAQ7?G_bURoRg+Fe#m delta 193 zcmdmF{>^N|GYLh%{F2P%R4WC?qN2n~g_3-Q;*z4wymW=+{JgT%qTmGKw5KB^E5Okb4tq)smzkFX$qNn Y3aZ5l`FRRCnR%%SswrG9`FW{a0EIk5vj6}9 diff --git a/ext/standard/tests/strings/strncasecmp_error.phpt b/ext/standard/tests/strings/strncasecmp_error.phpt index 7282ea9541..7b2d19e616 100644 --- a/ext/standard/tests/strings/strncasecmp_error.phpt +++ b/ext/standard/tests/strings/strncasecmp_error.phpt @@ -32,18 +32,18 @@ echo "*** Done ***\n"; *** Testing strncasecmp() function: error conditions *** -- Testing strncasecmp() function with Zero arguments -- -Warning: Wrong parameter count for strncasecmp() in %s on line %d +Warning: strncasecmp() expects exactly 3 parameters, 0 given in %s on line %d NULL -- Testing strncasecmp() function with less than expected number of arguments -- -Warning: Wrong parameter count for strncasecmp() in %s on line %d +Warning: strncasecmp() expects exactly 3 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for strncasecmp() in %s on line %d +Warning: strncasecmp() expects exactly 3 parameters, 2 given in %s on line %d NULL -- Testing strncasecmp() function with more than expected number of arguments -- -Warning: Wrong parameter count for strncasecmp() in %s on line %d +Warning: strncasecmp() expects exactly 3 parameters, 4 given in %s on line %d NULL -- Testing strncasecmp() function with invalid argument -- diff --git a/ext/standard/tests/strings/strncasecmp_variation10.phpt b/ext/standard/tests/strings/strncasecmp_variation10.phpt index e06b2b26bf..adc9253964 100644 --- a/ext/standard/tests/strings/strncasecmp_variation10.phpt +++ b/ext/standard/tests/strings/strncasecmp_variation10.phpt @@ -129,34 +129,34 @@ int(-%d) int(-%d) -- Iteration 15 -- -Notice: Array to string conversion in %s on line 88 +Warning: strlen() expects parameter 1 to be string, array given in %s on line 88 -Notice: Array to string conversion in %s on line 89 -int(-%d) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89 +NULL -- Iteration 16 -- -Notice: Array to string conversion in %s on line 88 +Warning: strlen() expects parameter 1 to be string, array given in %s on line 88 -Notice: Array to string conversion in %s on line 89 -int(-%d) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89 +NULL -- Iteration 17 -- -Notice: Array to string conversion in %s on line 88 +Warning: strlen() expects parameter 1 to be string, array given in %s on line 88 -Notice: Array to string conversion in %s on line 89 -int(-%d) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89 +NULL -- Iteration 18 -- -Notice: Array to string conversion in %s on line 88 +Warning: strlen() expects parameter 1 to be string, array given in %s on line 88 -Notice: Array to string conversion in %s on line 89 -int(-%d) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89 +NULL -- Iteration 19 -- -Notice: Array to string conversion in %s on line 88 +Warning: strlen() expects parameter 1 to be string, array given in %s on line 88 -Notice: Array to string conversion in %s on line 89 -int(-%d) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line 89 +NULL -- Iteration 20 -- int(-%d) -- Iteration 21 -- @@ -178,7 +178,11 @@ int(-%d) -- Iteration 29 -- int(-%d) -- Iteration 30 -- -int(-%d) + +Warning: strlen() expects parameter 1 to be string, resource given in %s on line 88 + +Warning: strncasecmp() expects parameter 1 to be string, resource given in %s on line 89 +NULL -- Iteration 31 -- int(-%d) *** Done *** diff --git a/ext/standard/tests/strings/strncasecmp_variation11.phpt b/ext/standard/tests/strings/strncasecmp_variation11.phpt index f756c6c006..03cc837077 100644 --- a/ext/standard/tests/strings/strncasecmp_variation11.phpt +++ b/ext/standard/tests/strings/strncasecmp_variation11.phpt @@ -130,34 +130,34 @@ int(%d) int(%d) -- Iteration 15 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL -- Iteration 16 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL -- Iteration 17 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL -- Iteration 18 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL -- Iteration 19 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(%d) +Warning: strncasecmp() expects parameter 2 to be string, array given in %s on line %d +NULL -- Iteration 20 -- int(%d) -- Iteration 21 -- @@ -179,7 +179,11 @@ int(%d) -- Iteration 29 -- int(%d) -- Iteration 30 -- -int(%d) + +Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d + +Warning: strncasecmp() expects parameter 2 to be string, resource given in %s on line %d +NULL -- Iteration 31 -- -int(%d) +int(4) *** Done *** diff --git a/ext/standard/tests/strings/strncasecmp_variation4.phpt b/ext/standard/tests/strings/strncasecmp_variation4.phpt index 3f73aa3518..9d46db9ee1 100644 --- a/ext/standard/tests/strings/strncasecmp_variation4.phpt +++ b/ext/standard/tests/strings/strncasecmp_variation4.phpt @@ -130,44 +130,34 @@ int(0) int(0) -- Iteration 15 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 16 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 17 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 18 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 19 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 20 -- int(0) -- Iteration 21 -- @@ -189,7 +179,11 @@ int(0) -- Iteration 29 -- int(0) -- Iteration 30 -- -int(0) + +Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d + +Warning: strncasecmp() expects parameter 1 to be string, resource given in %s on line %d +NULL -- Iteration 31 -- int(0) *** Done *** diff --git a/ext/standard/tests/strings/strncasecmp_variation5.phpt b/ext/standard/tests/strings/strncasecmp_variation5.phpt index 4a9fa89a7c..c391ba3e92 100644 --- a/ext/standard/tests/strings/strncasecmp_variation5.phpt +++ b/ext/standard/tests/strings/strncasecmp_variation5.phpt @@ -109,15 +109,25 @@ int(0) -- Iteration 7 -- int(0) -- Iteration 8 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 9 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 10 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 11 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 12 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, array given in %s on line %d +NULL -- Iteration 13 -- int(0) -- Iteration 14 -- @@ -131,17 +141,23 @@ int(0) -- Iteration 18 -- int(0) -- Iteration 19 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, string given in %s on line %d +NULL -- Iteration 20 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, string given in %s on line %d +NULL -- Iteration 21 -- int(0) -- Iteration 22 -- int(0) -- Iteration 23 -- -int(0) + +Warning: strncasecmp() expects parameter 3 to be long, resource given in %s on line %d +NULL -- Iteration 24 -- -Notice: Object of class sample could not be converted to int in %s on line %d -int(0) +Warning: strncasecmp() expects parameter 3 to be long, object given in %s on line %d +NULL *** Done *** diff --git a/ext/standard/tests/strings/strncmp_error.phpt b/ext/standard/tests/strings/strncmp_error.phpt index 317a90406a..8e4d2805eb 100644 --- a/ext/standard/tests/strings/strncmp_error.phpt +++ b/ext/standard/tests/strings/strncmp_error.phpt @@ -28,16 +28,16 @@ echo "*** Done ***\n"; --EXPECTF-- *** Testing strncmp() function: error conditions *** -Warning: Wrong parameter count for strncmp() in %s on line %d +Warning: strncmp() expects exactly 3 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for strncmp() in %s on line %d +Warning: strncmp() expects exactly 3 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for strncmp() in %s on line %d +Warning: strncmp() expects exactly 3 parameters, 2 given in %s on line %d NULL -Warning: Wrong parameter count for strncmp() in %s on line %d +Warning: strncmp() expects exactly 3 parameters, 4 given in %s on line %d NULL Warning: Length must be greater than or equal to 0 in %s on line %d diff --git a/ext/standard/tests/strings/strncmp_variation4.phpt b/ext/standard/tests/strings/strncmp_variation4.phpt index 2af95e9b49..84684ea551 100644 --- a/ext/standard/tests/strings/strncmp_variation4.phpt +++ b/ext/standard/tests/strings/strncmp_variation4.phpt @@ -133,44 +133,34 @@ int(0) int(0) -- Iteration 15 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 16 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 17 -- -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 18 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 19 -- -Notice: Array to string conversion in %s on line %d - -Notice: Array to string conversion in %s on line %d +Warning: strlen() expects parameter 1 to be string, array given in %s on line %d -Notice: Array to string conversion in %s on line %d -int(0) +Warning: strncmp() expects parameter 1 to be string, array given in %s on line %d +NULL -- Iteration 20 -- int(0) -- Iteration 21 -- @@ -192,7 +182,11 @@ int(0) -- Iteration 29 -- int(0) -- Iteration 30 -- -int(0) + +Warning: strlen() expects parameter 1 to be string, resource given in %s on line %d + +Warning: strncmp() expects parameter 1 to be string, resource given in %s on line %d +NULL -- Iteration 31 -- int(0) *** Done *** diff --git a/ext/standard/tests/strings/strncmp_variation5.phpt b/ext/standard/tests/strings/strncmp_variation5.phpt index cdb3afca19..73d7e8f319 100644 --- a/ext/standard/tests/strings/strncmp_variation5.phpt +++ b/ext/standard/tests/strings/strncmp_variation5.phpt @@ -123,15 +123,25 @@ int(0) -- Iteration 10 -- int(0) -- Iteration 11 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, array given in%s on line %d +NULL -- Iteration 12 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, array given in%s on line %d +NULL -- Iteration 13 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, array given in%s on line %d +NULL -- Iteration 14 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, array given in%s on line %d +NULL -- Iteration 15 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, array given in%s on line %d +NULL -- Iteration 16 -- int(0) -- Iteration 17 -- @@ -145,17 +155,23 @@ int(0) -- Iteration 21 -- int(0) -- Iteration 22 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, string given in%s on line %d +NULL -- Iteration 23 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, string given in%s on line %d +NULL -- Iteration 24 -- int(0) -- Iteration 25 -- int(0) -- Iteration 26 -- -int(0) + +Warning: strncmp() expects parameter 3 to be long, resource given in%s on line %d +NULL -- Iteration 27 -- -Notice: Object of class sample could not be converted to int in %s on line %d -int(0) +Warning: strncmp() expects parameter 3 to be long, object given in%s on line %d +NULL *** Done *** -- 2.40.0