Test::Deep::Matcher - Type check matchers for Test::Deep
use Test::More; use Test::Deep; use Test::Deep::Matcher; my $got = +{ foo => 'string', bar => 100, baz => [ 1, 2, 3 ], quux => { foo => 'bar' }, }; cmp_deeply($got, +{ foo => is_string, bar => is_integer, baz => is_array_ref, quux => is_hash_ref, }); done_testing;
Test::Deep::Matcher is a collection of Test::Deep type check matchers.
Checks the value type is SCALAR reference.
Checks the value type is ARRAY reference.
Checks the value type is HASH reference.
Checks the value type is CODE reference.
Checks the value type is GLOB reference.
Checks the value is primitive, is not undef.
Checks the value is string, has length.
Checks the value is number.
Checks the value is integer, is also number.
NAKAGAWA Masaki <masaki@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Test::Deep, <Data::Util>
To install Test::Deep::Matcher, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Deep::Matcher
CPAN shell
perl -MCPAN -e shell install Test::Deep::Matcher
For more information on module installation, please visit the detailed CPAN module installation guide.