in reply to A dispatch table to match named params of a sub
If the test fails it provides a bit more detail what went wrong, e.g.:sub mine { my %args = @_; is( $args{one}, 'first', 'arg one' ); is( $args{two}, 'second', 'arg two' ); done_testing; }
not ok 1 - arg one
# Failed test 'arg one'
# in ###.t at line ###.
# got: 'foo'
# expected: 'first'
Another one of my favorites:
is_deeply(\@computed, \@expected, 'testname') or diag(Data::Dumper->Dump([\@computed], ['*computed']));
|
|---|