use Test::Needs for backend tests
[p5sagit/JSON-MaybeXS.git] / t / xs.t
CommitLineData
3be1e192 1use strict;
4e1fb2f8 2use warnings;
16205c4a 3
b4d74169 4# hide Cpanel::JSON::XS
5use 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};
9
2c67ae64 10use Test::More 0.88;
3be1e192 11use JSON::MaybeXS;
12
17528b04 13use Test::Needs 'JSON::XS';
0b694b31 14diag 'Using JSON::XS ', JSON::XS->VERSION;
15
16205c4a 16is( JSON, 'JSON::XS', 'Correct JSON class' );
3be1e192 17
16205c4a 18is( \&encode_json, \&JSON::XS::encode_json, 'Correct encode_json function' );
19is( \&decode_json, \&JSON::XS::decode_json, 'Correct encode_json function' );
3be1e192 20
9c4f62de 21require './t/lib/is_bool.pm';
1ca3b561 22
3be1e192 23done_testing;