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

Unified Diff: third_party/JSON/JSON-2.59/t/x12_blessed.t

Issue 183763019: Remove third_party/JSON (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/JSON/JSON-2.59/t/x02_error.t ('k') | third_party/JSON/JSON-2.59/t/x16_tied.t » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/JSON/JSON-2.59/t/x12_blessed.t
diff --git a/third_party/JSON/JSON-2.59/t/x12_blessed.t b/third_party/JSON/JSON-2.59/t/x12_blessed.t
deleted file mode 100644
index b6df13aef79b12ef4e55d6246af09c80cce8c810..0000000000000000000000000000000000000000
--- a/third_party/JSON/JSON-2.59/t/x12_blessed.t
+++ /dev/null
@@ -1,54 +0,0 @@
-use strict;
-use Test::More;
-BEGIN { plan tests => 16 };
-
-BEGIN { $ENV{PERL_JSON_BACKEND} = 1; }
-
-use JSON;
-
-SKIP: {
- skip "can't use JSON::XS.", 16, unless( JSON->backend->is_xs );
-
-my $o1 = bless { a => 3 }, "XX";
-my $o2 = bless \(my $dummy = 1), "YY";
-
-sub XX::TO_JSON {
- {'__',""}
-}
-
-my $js = JSON->new;
-
-eval { $js->encode ($o1) }; ok ($@ =~ /allow_blessed/);
-eval { $js->encode ($o2) }; ok ($@ =~ /allow_blessed/);
-$js->allow_blessed;
-ok ($js->encode ($o1) eq "null");
-ok ($js->encode ($o2) eq "null");
-$js->convert_blessed;
-ok ($js->encode ($o1) eq '{"__":""}');
-
-ok ($js->encode ($o2) eq "null");
-
-$js->filter_json_object (sub { 5 });
-$js->filter_json_single_key_object (a => sub { shift });
-$js->filter_json_single_key_object (b => sub { 7 });
-
-ok ("ARRAY" eq ref $js->decode ("[]"));
-ok (5 eq join ":", @{ $js->decode ('[{}]') });
-ok (6 eq join ":", @{ $js->decode ('[{"a":6}]') });
-ok (5 eq join ":", @{ $js->decode ('[{"a":4,"b":7}]') });
-
-$js->filter_json_object;
-ok (7 == $js->decode ('[{"a":4,"b":7}]')->[0]{b});
-ok (3 eq join ":", @{ $js->decode ('[{"a":3}]') });
-
-$js->filter_json_object (sub { });
-ok (7 == $js->decode ('[{"a":4,"b":7}]')->[0]{b});
-ok (9 eq join ":", @{ $js->decode ('[{"a":9}]') });
-
-$js->filter_json_single_key_object ("a");
-ok (4 == $js->decode ('[{"a":4}]')->[0]{a});
-
-$js->filter_json_single_key_object (a => sub {});
-ok (4 == $js->decode ('[{"a":4}]')->[0]{a});
-
-}
« no previous file with comments | « third_party/JSON/JSON-2.59/t/x02_error.t ('k') | third_party/JSON/JSON-2.59/t/x16_tied.t » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698