remove test dependency on Test::Without::Module (RT#115394)
[p5sagit/JSON-MaybeXS.git] / t / xs.t
1 use strict;
2 use warnings;
3
4 # hide Cpanel::JSON::XS
5 use lib map {
6     my ( $m, $c ) = ( $_, qq{die "Can't locate $_ (hidden)\n"} );
7     sub { return unless $_[1] eq $m; open my $fh, "<", \$c; return $fh }
8 } qw{Cpanel/JSON/XS.pm};
9
10 use Test::More 0.88;
11 use JSON::MaybeXS;
12
13 unless ( eval { require JSON::XS; 1 } ) {
14     plan skip_all => 'No JSON::XS';
15 }
16
17 diag 'Using JSON::XS ', JSON::XS->VERSION;
18
19 is( JSON, 'JSON::XS', 'Correct JSON class' );
20
21 is( \&encode_json, \&JSON::XS::encode_json, 'Correct encode_json function' );
22 is( \&decode_json, \&JSON::XS::decode_json, 'Correct encode_json function' );
23
24 require 't/lib/is_bool.pm';
25
26 done_testing;