Commit | Line | Data |
---|---|---|
3be1e192 | 1 | use strict; |
4e1fb2f8 | 2 | use warnings; |
0b694b31 | 3 | |
b4d74169 | 4 | # hide Cpanel::JSON::XS, JSON::XS |
5 | use lib map { | |
7c484eb9 | 6 | my $m = $_; |
7 | sub { return unless $_[1] eq $m; die "Can't locate $m in \@INC (hidden).\n" }; | |
b4d74169 | 8 | } qw{Cpanel/JSON/XS.pm JSON/XS.pm}; |
9 | ||
17528b04 | 10 | use Test::Needs 'JSON::PP'; |
2c67ae64 | 11 | use Test::More 0.88; |
3be1e192 | 12 | use JSON::MaybeXS; |
13 | ||
0b694b31 | 14 | diag 'Using JSON::PP ', JSON::PP->VERSION; |
15 | ||
3be1e192 | 16 | is(JSON, 'JSON::PP', 'Correct JSON class'); |
17 | ||
18 | is( | |
19 | \&encode_json, \&JSON::PP::encode_json, | |
20 | 'Correct encode_json function' | |
21 | ); | |
22 | ||
23 | is( | |
24 | \&decode_json, \&JSON::PP::decode_json, | |
25 | 'Correct encode_json function' | |
26 | ); | |
27 | ||
9c4f62de | 28 | require './t/lib/is_bool.pm'; |
1ca3b561 | 29 | |
3be1e192 | 30 | done_testing; |