dmitry Tue Jul 10 07:51:23 2007 UTC
Modified files:
/php-src/ext/json/tests pass001.1.phpt
Log:
Fixed test
http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/pass001.1.phpt?r1=1.8&r2=1.9&diff_format=u
Index: php-src/ext/json/tests/pass001.1.phpt
diff -u php-src/ext/json/tests/pass001.1.phpt:1.8
php-src/ext/json/tests/pass001.1.phpt:1.9
--- php-src/ext/json/tests/pass001.1.phpt:1.8 Fri Jun 8 09:03:23 2007
+++ php-src/ext/json/tests/pass001.1.phpt Tue Jul 10 07:51:23 2007
@@ -383,7 +383,7 @@
float(1.23456789E-13)
["E"]=>
float(1.23456789E+34)
- ["_empty_"]=>
+ [""]=>
float(INF)
["E no ."]=>
float(4000000000000)
@@ -527,9 +527,9 @@
string(7) "rosebud"
}
ENCODE: FROM OBJECT
-["JSON Test Pattern pass1",{"object with 1 member":["array with 1
element"]},{},[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"_empty_":0,"E
no .":4.0e+12,"zero":0,"one":1,"space":"
","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"\/ &
\/","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","special":"[EMAIL
PROTECTED]&*()_+-={':[,]}|;.<\/>?","hex":"\u0123\u4567\u89ab\ucdef\uabcd\uef4a","unicode":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","empty_string":"","true":true,"false":false,"null":null,"array":[],"object":{},"123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},"address":"50
St. James Street","url":"http:\/\/www.JSON.org\/","comment":"\/\/ \/* <!--
--","# -- --> *\/":" "," s p a c e d
":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object with 1 me!
mber\":[\"array with 1 element\"]}","quotes":"" \" %22 0x22 034
"","\/\\\"[EMAIL PROTECTED]&*()_+-=[]{}|;:',.\/<>?":"A key can be any
string"},0.5,98.6,99.44,1066,"rosebud"]
+["JSON Test Pattern pass1",{"object with 1 member":["array with 1
element"]},{},[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"_empty_":0,"E
no .":4000000000000,"zero":0,"one":1,"space":"
","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"\/ &
\/","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","special":"[EMAIL
PROTECTED]&*()_+-={':[,]}|;.<\/>?","hex":"\u0123\u4567\u89ab\ucdef\uabcd\uef4a","unicode":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","empty_string":"","true":true,"false":false,"null":null,"array":[],"object":{},"123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},"address":"50
St. James Street","url":"http:\/\/www.JSON.org\/","comment":"\/\/ \/* <!--
--","# -- --> *\/":" "," s p a c e d
":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object wit!
h 1 member\":[\"array with 1 element\"]}","quotes":"" \" %22 0x22 034
"","\/\\\"[EMAIL PROTECTED]&*()_+-=[]{}|;:',.\/<>?":"A key can be any
string"},0.5,98.6,99.44,1066,"rosebud"]
ENCODE: FROM ARRAY
-["JSON Test Pattern pass1",{"object with 1 member":["array with 1
element"]},[],[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"_empty_":0,"E
no .":4.0e+12,"zero":0,"one":1,"space":"
","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"\/ &
\/","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","special":"[EMAIL
PROTECTED]&*()_+-={':[,]}|;.<\/>?","hex":"\u0123\u4567\u89ab\ucdef\uabcd\uef4a","unicode":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","empty_string":"","true":true,"false":false,"null":null,"array":[],"object":[],"123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},"address":"50
St. James Street","url":"http:\/\/www.JSON.org\/","comment":"\/\/ \/* <!--
--","# -- --> *\/":" "," s p a c e d
":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object with 1 me!
mber\":[\"array with 1 element\"]}","quotes":"" \" %22 0x22 034
"","\/\\\"[EMAIL PROTECTED]&*()_+-=[]{}|;:',.\/<>?":"A key can be any
string"},0.5,98.6,99.44,1066,"rosebud"]
+["JSON Test Pattern pass1",{"object with 1 member":["array with 1
element"]},[],[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"":0,"E
no .":4000000000000,"zero":0,"one":1,"space":"
","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"\/ &
\/","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","special":"[EMAIL
PROTECTED]&*()_+-={':[,]}|;.<\/>?","hex":"\u0123\u4567\u89ab\ucdef\uabcd\uef4a","unicode":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","empty_string":"","true":true,"false":false,"null":null,"array":[],"object":[],"123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},"address":"50
St. James Street","url":"http:\/\/www.JSON.org\/","comment":"\/\/ \/* <!--
--","# -- --> *\/":" "," s p a c e d
":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object with 1 mem!
ber\":[\"array with 1 element\"]}","quotes":"" \" %22 0x22 034
"","\/\\\"[EMAIL PROTECTED]&*()_+-=[]{}|;:',.\/<>?":"A key can be any
string"},0.5,98.6,99.44,1066,"rosebud"]
DECODE AGAIN: AS OBJECT
array(14) {
[0]=>
@@ -569,7 +569,7 @@
["_empty_"]=>
int(0)
["E no ."]=>
- float(4000000000000)
+ %s(4000000000000)
["zero"]=>
int(0)
["one"]=>
@@ -745,10 +745,10 @@
float(1.23456789E-13)
["E"]=>
float(1.23456789E+34)
- ["_empty_"]=>
+ [""]=>
int(0)
["E no ."]=>
- float(4000000000000)
+ %s(4000000000000)
["zero"]=>
int(0)
["one"]=>
@@ -1167,7 +1167,7 @@
float(1.23456789E-13)
[u"E"]=>
float(1.23456789E+34)
- [u"_empty_"]=>
+ [u""]=>
float(INF)
[u"E no ."]=>
float(4000000000000)
@@ -1311,9 +1311,9 @@
unicode(7) "rosebud"
}
ENCODE: FROM OBJECT
-["JSON Test Pattern pass1",{"object with 1 member":["array with 1
element"]},{},[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"_empty_":0,"E
no .":4.0e+12,"zero":0,"one":1,"space":"
","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"\/ &
\/","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","special":"[EMAIL
PROTECTED]&*()_+-={':[,]}|;.<\/>?","hex":"\u0123\u4567\u89ab\ucdef\uabcd\uef4a","unicode":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","empty_string":"","true":true,"false":false,"null":null,"array":[],"object":{},"123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},"address":"50
St. James Street","url":"http:\/\/www.JSON.org\/","comment":"\/\/ \/* <!--
--","# -- --> *\/":" "," s p a c e d
":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object with 1 me!
mber\":[\"array with 1 element\"]}","quotes":"" \" %22 0x22 034
"","\/\\\"[EMAIL PROTECTED]&*()_+-=[]{}|;:',.\/<>?":"A key can be any
string"},0.5,98.6,99.44,1066,"rosebud"]
+["JSON Test Pattern pass1",{"object with 1 member":["array with 1
element"]},{},[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"_empty_":0,"E
no .":4000000000000,"zero":0,"one":1,"space":"
","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"\/ &
\/","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","special":"[EMAIL
PROTECTED]&*()_+-={':[,]}|;.<\/>?","hex":"\u0123\u4567\u89ab\ucdef\uabcd\uef4a","unicode":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","empty_string":"","true":true,"false":false,"null":null,"array":[],"object":{},"123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},"address":"50
St. James Street","url":"http:\/\/www.JSON.org\/","comment":"\/\/ \/* <!--
--","# -- --> *\/":" "," s p a c e d
":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object wit!
h 1 member\":[\"array with 1 element\"]}","quotes":"" \" %22 0x22 034
"","\/\\\"[EMAIL PROTECTED]&*()_+-=[]{}|;:',.\/<>?":"A key can be any
string"},0.5,98.6,99.44,1066,"rosebud"]
ENCODE: FROM ARRAY
-["JSON Test Pattern pass1",{"object with 1 member":["array with 1
element"]},[],[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"_empty_":0,"E
no .":4.0e+12,"zero":0,"one":1,"space":"
","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"\/ &
\/","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","special":"[EMAIL
PROTECTED]&*()_+-={':[,]}|;.<\/>?","hex":"\u0123\u4567\u89ab\ucdef\uabcd\uef4a","unicode":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","empty_string":"","true":true,"false":false,"null":null,"array":[],"object":[],"123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},"address":"50
St. James Street","url":"http:\/\/www.JSON.org\/","comment":"\/\/ \/* <!--
--","# -- --> *\/":" "," s p a c e d
":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object with 1 me!
mber\":[\"array with 1 element\"]}","quotes":"" \" %22 0x22 034
"","\/\\\"[EMAIL PROTECTED]&*()_+-=[]{}|;:',.\/<>?":"A key can be any
string"},0.5,98.6,99.44,1066,"rosebud"]
+["JSON Test Pattern pass1",{"object with 1 member":["array with 1
element"]},[],[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"":0,"E
no .":4000000000000,"zero":0,"one":1,"space":"
","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"\/ &
\/","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","special":"[EMAIL
PROTECTED]&*()_+-={':[,]}|;.<\/>?","hex":"\u0123\u4567\u89ab\ucdef\uabcd\uef4a","unicode":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8":"\u30d7\u30ec\u30b9\u30ad\u30c3\u30c8","empty_string":"","true":true,"false":false,"null":null,"array":[],"object":[],"123":{"456":{"abc":{"789":"def","012":[1,2,"5",500],"ghi":[1,2,"five",50,"sixty"]}}},"address":"50
St. James Street","url":"http:\/\/www.JSON.org\/","comment":"\/\/ \/* <!--
--","# -- --> *\/":" "," s p a c e d
":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object with 1 mem!
ber\":[\"array with 1 element\"]}","quotes":"" \" %22 0x22 034
"","\/\\\"[EMAIL PROTECTED]&*()_+-=[]{}|;:',.\/<>?":"A key can be any
string"},0.5,98.6,99.44,1066,"rosebud"]
DECODE AGAIN: AS OBJECT
array(14) {
[0]=>
@@ -1353,7 +1353,7 @@
[u"_empty_"]=>
int(0)
[u"E no ."]=>
- float(4000000000000)
+ %s(4000000000000)
[u"zero"]=>
int(0)
[u"one"]=>
@@ -1529,10 +1529,10 @@
float(1.23456789E-13)
[u"E"]=>
float(1.23456789E+34)
- [u"_empty_"]=>
+ [u""]=>
int(0)
[u"E no ."]=>
- float(4000000000000)
+ %s(4000000000000)
[u"zero"]=>
int(0)
[u"one"]=>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php