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

Side by Side Diff: third_party/JSON/JSON-2.59/t/xe12_boolean.t

Issue 15736030: Add JSON.pm to third_party (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix permissions and shebangs 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
2 use strict;
3 use Test::More;
4
5 BEGIN { plan tests => 4 };
6
7 BEGIN { $ENV{PERL_JSON_BACKEND} = 1; }
8
9 use JSON -support_by_pp;
10
11 BEGIN {
12 use lib qw(t);
13 use _unicode_handling;
14 }
15
16
17 SKIP: {
18 skip "can't use JSON::XS.", 4, unless( JSON->backend->is_xs );
19
20 my $json = new JSON;
21 my $bool = $json->allow_nonref->decode('true');
22
23 # it's normal
24 isa_ok( $bool, 'JSON::Boolean' );
25 is( $json->encode([ JSON::true ]), '[true]' );
26
27 # make XS non support flag enable!
28 $bool = $json->allow_singlequote->decode('true');
29
30 isa_ok( $bool, 'JSON::Boolean' );
31 is( $json->encode([ JSON::true ]), '[true]' );
32
33 }
34
35 __END__
OLDNEW
« no previous file with comments | « third_party/JSON/JSON-2.59/t/xe11_conv_blessed_univ.t ('k') | third_party/JSON/JSON-2.59/t/xe19_xs_and_suportbypp.t » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698