File: cpanel.t

package info (click to toggle)
libjson-maybexs-perl 1.004008-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 192 kB
  • sloc: perl: 299; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 693 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use strict;
use warnings;
use Test::More 0.88;
use JSON::MaybeXS;

use Test::Needs 'Cpanel::JSON::XS';
diag 'Using Cpanel::JSON::XS ', Cpanel::JSON::XS->VERSION;

is( JSON, 'Cpanel::JSON::XS', 'Correct JSON class' );

is( \&encode_json,
    \&Cpanel::JSON::XS::encode_json,
    'Correct encode_json function'
);

is( \&decode_json,
    \&Cpanel::JSON::XS::decode_json,
    'Correct encode_json function'
);

my ($zero, $one) = (0, 1);
ok(JSON::MaybeXS::is_bool(bless(\$zero, 'Cpanel::JSON::XS::Boolean')), 'Cpanel::JSON::XS::Boolean true');
ok(JSON::MaybeXS::is_bool(bless(\$one, 'Cpanel::JSON::XS::Boolean')), 'Cpanel::JSON::XS::Boolean false');

require './t/lib/is_bool.pm';

done_testing;