do not add an XS prereq if PUREPERL_ONLY passed to Makefile.PL
[p5sagit/JSON-MaybeXS.git] / t / xs.t
CommitLineData
3be1e192 1use strict;
2use warnings FATAL => 'all';
16205c4a 3
4use Test::Without::Module 'Cpanel::JSON::XS';
3be1e192 5use Test::More;
6use JSON::MaybeXS;
7
16205c4a 8unless ( eval { require JSON::XS; 1 } ) {
a3dc87a6 9 plan skip_all => 'No JSON::XS';
16205c4a 10 done_testing;
11 exit;
12}
3be1e192 13
16205c4a 14is( JSON, 'JSON::XS', 'Correct JSON class' );
3be1e192 15
16205c4a 16is( \&encode_json, \&JSON::XS::encode_json, 'Correct encode_json function' );
17is( \&decode_json, \&JSON::XS::decode_json, 'Correct encode_json function' );
3be1e192 18
19done_testing;