X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fpreload_xs.t;h=48dcf1d3c5c6534f996f45cb918d33861d13b22e;hb=HEAD;hp=f5c94b65757231e91b23549359f90a5425a2bb73;hpb=1ca3b561cb6fd6381767d8df4564eeff4de7dc98;p=p5sagit%2FJSON-MaybeXS.git diff --git a/t/preload_xs.t b/t/preload_xs.t index f5c94b6..48dcf1d 100644 --- a/t/preload_xs.t +++ b/t/preload_xs.t @@ -1,14 +1,17 @@ use strict; -use warnings FATAL => 'all'; -use if !eval { require JSON::XS; 1; }, 'Test::More', skip_all => 'No JSON::XS'; -use Test::More; +use warnings; + +use Test::Needs { 'JSON::XS' => '3.0' }; # load first, before JSON::MaybeXS +use Test::More 0.88; use JSON::MaybeXS; +diag 'Using JSON::XS ', JSON::XS->VERSION; + is( JSON, 'JSON::XS', 'Correct JSON class' ); is( \&encode_json, \&JSON::XS::encode_json, 'Correct encode_json function' ); is( \&decode_json, \&JSON::XS::decode_json, 'Correct encode_json function' ); -require 't/lib/is_bool.pm'; +require './t/lib/is_bool.pm'; done_testing;