use Test::Needs for backend tests
[p5sagit/JSON-MaybeXS.git] / t / preload_cpanel.t
index f3a4cef..660be54 100644 (file)
@@ -1,9 +1,12 @@
 use strict;
-use warnings FATAL => 'all';
-use if !eval { require Cpanel::JSON::XS; 1; }, 'Test::More', skip_all => 'No Cpanel::JSON::XS';
-use Test::More;
+use warnings;
+
+use Test::Needs 'Cpanel::JSON::XS'; # load first, before JSON::MaybeXS
+use Test::More 0.88;
 use JSON::MaybeXS;
 
+diag 'Using Cpanel::JSON::XS ', Cpanel::JSON::XS->VERSION;
+
 is(JSON, 'Cpanel::JSON::XS', 'Correct JSON class');
 
 is(
@@ -16,4 +19,6 @@ is(
   'Correct encode_json function'
 );
 
+require './t/lib/is_bool.pm';
+
 done_testing;