Commit | Line | Data |
---|---|---|
3be1e192 | 1 | use strict; |
2 | use warnings FATAL => 'all'; | |
16205c4a | 3 | |
4 | use Test::Without::Module 'Cpanel::JSON::XS'; | |
3be1e192 | 5 | use Test::More; |
6 | use JSON::MaybeXS; | |
7 | ||
16205c4a | 8 | unless ( eval { require JSON::XS; 1 } ) { |
a3dc87a6 | 9 | plan skip_all => 'No JSON::XS'; |
16205c4a | 10 | done_testing; |
11 | exit; | |
12 | } | |
3be1e192 | 13 | |
16205c4a | 14 | is( JSON, 'JSON::XS', 'Correct JSON class' ); |
3be1e192 | 15 | |
16205c4a | 16 | is( \&encode_json, \&JSON::XS::encode_json, 'Correct encode_json function' ); |
17 | is( \&decode_json, \&JSON::XS::decode_json, 'Correct encode_json function' ); | |
3be1e192 | 18 | |
19 | done_testing; |