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

Side by Side Diff: trunk/src/third_party/JSON/JSON-2.59/t/xe02_bool.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 #!/usr/bin/perl -w
2
3 use strict;
4
5 use Test::More;
6 use strict;
7
8 BEGIN { plan tests => 11 };
9
10 BEGIN { $ENV{PERL_JSON_BACKEND} = 1; }
11
12 use JSON;
13
14 SKIP: {
15 skip "can't use JSON::XS.", 11, unless( JSON->backend->is_xs );
16
17 my $json = new JSON;
18
19 is($json->encode([!1]), '[""]');
20 is($json->encode([!!2]), '["1"]');
21
22 is($json->encode([ 'a' eq 'b' ]), '[""]');
23 is($json->encode([ 'a' eq 'a' ]), '["1"]');
24
25 is($json->encode([ ('a' eq 'b') + 1 ]), '[1]');
26 is($json->encode([ ('a' eq 'a') + 1 ]), '[2]');
27
28 ok(JSON::true eq 'true');
29 ok(JSON::true eq '1');
30 ok(JSON::true == 1);
31 isa_ok(JSON::true, JSON->backend . '::Boolean');
32 isa_ok(JSON::true, 'JSON::Boolean');
33
34 }
OLDNEW
« no previous file with comments | « trunk/src/third_party/JSON/JSON-2.59/t/xe01_property.t ('k') | trunk/src/third_party/JSON/JSON-2.59/t/xe03_bool2.t » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698