Subject: | Confusing diagnostics |
Date: | Tue, 10 Jul 2012 09:52:28 +0200 |
To: | <bug-Test-Deep [...] rt.cpan.org> |
From: | Henrik Hald Nørgaard <henrik [...] jobindex.dk> |
I am using perl 5, version 14, subversion 2 (v5.14.2) built for
x86_64-linux and version 0.110 of Test::Deep.
When I run the following oneliner:
perl -E 'package Ymer; use Test::Deep; sub isa_ymer { my $class = shift;
cmp_deeply($class, isa("Ymer")); } Ymer->isa_ymer();'
I get this output:
not ok 1
# Failed test at -e line 1.
# Checking class of $data with isa()
# got : 'Ymer'
# expect : 'Ymer'
# Tests were run but no plan was declared and done_testing() was not seen.
This test fails, because Test::Deep tests if the class "Ymer" is a blessed
instance of "Ymer", which is not the case.
In Test::Deep version 0.108 this didn't fail. It is okay to change this
behaivour, but the diagnostics is confusing, as the values for "got" and
"expect" are equal.
This is a minor issue.
Kind regards
Henrik Hald Nørgaard, Programmør
Jobindex A/S, Holger Danskes Vej 91, 2000 Frederiksberg
Tlf.: +45 38 32 33 55, dir.: +45 38 32 33 81
www.jobindex.dk