Codebase list libmoosex-storage-perl / 8a1608b
fix tests: Test::Needs does not call $module->import Karen Etheridge 5 years ago
12 changed file(s) with 15 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
99 my $dir = tempdir;
1010
1111 use Test::Needs 'JSON::MaybeXS';
12 diag 'using JSON backend: ', JSON;
12 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
1313
1414 plan tests => 9;
1515
77 JSON::MaybeXS
88 Test::Deep::JSON
99 );
10 diag 'using JSON backend: ', JSON;
10 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
1111
1212 plan tests => 10;
1313
4141
4242 cmp_deeply(
4343 $json,
44 json({
44 Test::Deep::JSON::json({
4545 number => 10,
4646 string => 'foo',
4747 float => 10.5,
66 Encode
77 JSON::MaybeXS
88 );
9 diag 'using JSON backend: ', JSON;
9 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
1010
1111 binmode $_, ':utf8' foreach map { Test::Builder->new->$_ } qw(output failure_output todo_output);
1212 binmode STDOUT, ':utf8';
44 use Test::Deep;
55
66 use Test::Needs qw(MooseX::Storage::Format::JSONpm JSON::MaybeXS);
7
8 JSON::MaybeXS->import;
79
810 plan tests => 5;
911
88 Digest::HMAC_SHA1
99 JSON::MaybeXS
1010 );
11 diag 'using JSON backend: ', JSON;
11 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
1212
1313 plan tests => 25;
1414
1010 JSON::MaybeXS
1111 YAML::Any
1212 );
13 diag 'using JSON backend: ', JSON;
13 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
1414 diag 'using YAML backend: ', YAML::Any->implementation;
1515
1616 plan tests => 33;
4848
4949 cmp_deeply(
5050 $json,
51 json({
51 Test::Deep::JSON::json({
5252 undef => undef,
5353 number => 10,
5454 string => 'foo',
1111 IO::AtomicFile
1212 JSON::MaybeXS
1313 );
14 diag 'using JSON backend: ', JSON;
14 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
1515
1616 plan tests => 23;
1717
77 my $dir = tempdir;
88
99 use Test::Needs 'JSON::MaybeXS';
10 diag 'using JSON backend: ', JSON;
10 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
1111
1212 plan tests => 13;
1313
1010 JSON::MaybeXS
1111 IO::AtomicFile
1212 );
13 diag 'using JSON backend: ', JSON;
13 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
1414
1515 plan tests => 13;
1616
99 JSON::MaybeXS
1010 IO::AtomicFile
1111 );
12 diag 'using JSON backend: ', JSON;
12 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
1313
1414 plan tests => 7;
1515
99 JSON::MaybeXS
1010 IO::AtomicFile
1111 );
12 diag 'using JSON backend: ', JSON;
12 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
1313
1414 binmode $_, ':utf8' foreach map { Test::Builder->new->$_ } qw(output failure_output todo_output);
1515 binmode STDOUT, ':utf8';
1616 binmode STDERR, ':utf8';
17
18 diag 'using JSON backend: ', JSON;
1917
2018 plan tests => 7;
2119
33 use Test::Fatal;
44
55 use Test::Needs 'JSON::MaybeXS';
6 diag 'using JSON backend: ', JSON;
6 diag 'using JSON backend: ', JSON::MaybeXS->JSON;
77
88 {
99 package Thing;