Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: trunk/src/third_party/JSON/JSON-2.59/t/16_tied.t

Issue 16539003: Revert 205057 "Add JSON.pm to third_party" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # copied over from JSON::XS and modified to use JSON
2
3 use strict;
4 use Test::More;
5 BEGIN { plan tests => 2 };
6
7 BEGIN { $ENV{PERL_JSON_BACKEND} = "JSON::backportPP"; }
8
9 use JSON;
10 use Tie::Hash;
11 use Tie::Array;
12
13 my $js = JSON->new;
14
15 tie my %h, 'Tie::StdHash';
16 %h = (a => 1);
17
18 ok ($js->encode (\%h) eq '{"a":1}');
19
20 tie my @a, 'Tie::StdArray';
21 @a = (1, 2);
22
23 ok ($js->encode (\@a) eq '[1,2]');
OLDNEW
« no previous file with comments | « trunk/src/third_party/JSON/JSON-2.59/t/15_prefix.t ('k') | trunk/src/third_party/JSON/JSON-2.59/t/17_relaxed.t » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698