--- JSON-XS/t/99_binary.t 2007/07/01 22:20:00 1.1 +++ JSON-XS/t/99_binary.t 2009/01/10 20:05:40 1.3 @@ -11,12 +11,12 @@ my $js; $js = JSON::XS->new->allow_nonref(0)->utf8->ascii->shrink->encode ([$_[0]]); - ok ($_[0] eq ((from_json $js)->[0]), 0); + ok ($_[0] eq ((decode_json $js)->[0]), 0); $js = JSON::XS->new->allow_nonref(0)->utf8->ascii->encode ([$_[0]]); ok ($_[0] eq (JSON::XS->new->utf8->shrink->decode($js))->[0], 1); $js = JSON::XS->new->allow_nonref(0)->utf8->shrink->encode ([$_[0]]); - ok ($_[0] eq ((from_json $js)->[0]), 2); + ok ($_[0] eq ((decode_json $js)->[0]), 2); $js = JSON::XS->new->allow_nonref(1)->utf8->encode ([$_[0]]); ok ($_[0] eq (JSON::XS->new->utf8->shrink->decode($js))->[0], 3); @@ -31,7 +31,7 @@ ok ($_[0] eq JSON::XS->new->shrink->decode ($js)->[0], 7); } -srand 0; # doesn't help too much, but its at leats more deterministic +srand 0; # doesn't help too much, but its at least more deterministic for (1..768) { test join "", map chr ($_ & 255), 0..$_; @@ -39,3 +39,4 @@ test join "", map chr ($_ * 97 & ~0x4000), 0..$_; test join "", map chr (rand (2**20) & ~0x800), 0..$_; } +