File: rt78288_blessed_object.t

package info (click to toggle)
libtest-deep-perl 1.205-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 620 kB
  • sloc: perl: 2,413; makefile: 9
file content (21 lines) | stat: -rw-r--r-- 310 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use warnings FATAL => 'all';
use lib 't/lib';

use Std;

check_test(
    sub { cmp_deeply('Foo', isa('Foo')) },
    {
        actual_ok => 0,
        diag => <<EOM,
Checking class of \$data with isa()
   got : 'Foo'
expect : blessed into or ref of type 'Foo'
EOM
    },
    'isa on a string'
);