sub is-deeply
1 | module Test |
1.1 | (Test) sub is-deeply |
Documentation for sub is-deeply
assembled from the following types:
module Test
From Test
(Test) sub is-deeply
Defined as:
multi sub is-deeply(Seq , Seq , = '')multi sub is-deeply(Seq , Mu , = '')multi sub is-deeply(Mu , Seq , = '')multi sub is-deeply(Mu , Mu , = '')
Marks a test as passed if $value
and $expected
are equivalent, using the same semantics as the eqv operator. This is the best way to check for equality of (deep) data structures. The function accepts an optional description of the test as the last argument.
use Test;plan 1;sub string-info(Str() )is-deeply string-info('42 Butterflies ♥ Perl'), Map.new((:21length,char-counts => Bag.new-from-pairs: ( :15letters, :2digits, :4other, ))), 'string-info gives right info';
Note: for historical reasons, Seq:D arguments to is-deeply
get converted to Lists. If you want to ensure strict Seq
comparisons, use cmp-ok $got, 'eqv', $expected, $desc
instead.