ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/JSON-XS/t/52_object.t
(Generate patch)

Comparing JSON-XS/t/52_object.t (file contents):
Revision 1.1 by root, Mon Oct 28 23:19:54 2013 UTC vs.
Revision 1.2 by root, Mon Oct 28 23:23:11 2013 UTC

1BEGIN { $| = 1; print "1..20\n"; } 1BEGIN { $| = 1; print "1..20\n"; }
2 2
3use JSON::XS; 3use JSON::XS;
4 4
5$json = JSON::XS->new->convert_blessed; 5$json = JSON::XS->new->convert_blessed->allow_tags->allow_nonref;
6 6
7print "ok 1\n"; 7print "ok 1\n";
8 8
9sub JSON::XS::tojson::TO_JSON { 9sub JSON::XS::tojson::TO_JSON {
10 print @_ == 1 ? "" : "not ", "ok 3\n"; 10 print @_ == 1 ? "" : "not ", "ok 3\n";
19 19
20$enc = $json->encode ($obj); 20$enc = $json->encode ($obj);
21print $enc eq 7 ? "" : "not ", "ok 6 # $enc\n"; 21print $enc eq 7 ? "" : "not ", "ok 6 # $enc\n";
22 22
23print "ok 7\n"; 23print "ok 7\n";
24
25$json = JSON::XS->new->allow_tags->allow_nonref;
26 24
27sub JSON::XS::freeze::FREEZE { 25sub JSON::XS::freeze::FREEZE {
28 print @_ == 2 ? "" : "not ", "ok 8\n"; 26 print @_ == 2 ? "" : "not ", "ok 8\n";
29 print $_[1] eq "JSON" ? "" : "not ", "ok 9\n"; 27 print $_[1] eq "JSON" ? "" : "not ", "ok 9\n";
30 print JSON::XS::freeze:: eq ref $_[0] ? "" : "not ", "ok 10\n"; 28 print JSON::XS::freeze:: eq ref $_[0] ? "" : "not ", "ok 10\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines