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

Comparing JSON-XS/t/13_limit.t (file contents):
Revision 1.1 by root, Sun Mar 25 21:19:14 2007 UTC vs.
Revision 1.2 by root, Thu Mar 29 02:45:50 2007 UTC

7 print $_[0] ? "" : "not ", "ok ", ++$test, "\n"; 7 print $_[0] ? "" : "not ", "ok ", ++$test, "\n";
8} 8}
9 9
10my $js = JSON::XS->new; 10my $js = JSON::XS->new;
11 11
12ok (ref $js->decode (("[" x 8192) . ("]" x 8192))); 12ok (ref $js->decode (("[" x 4096) . ("]" x 4096)));
13ok (ref $js->decode (("{\"\":" x 8191) . "[]" . ("}" x 8191))); 13ok (ref $js->decode (("{\"\":" x 4095) . "[]" . ("}" x 4095)));
14ok (ref $js->max_depth (32)->decode (("[" x 32) . ("]" x 32))); 14ok (ref $js->max_depth (32)->decode (("[" x 32) . ("]" x 32)));
15 15
16ok ($js->max_depth(1)->encode ([])); 16ok ($js->max_depth(1)->encode ([]));
17ok (!eval { $js->encode ([[]]), 1 }); 17ok (!eval { $js->encode ([[]]), 1 });
18 18

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines