File: isa.t

package info (click to toggle)
libsyntax-keyword-assert-perl 0.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: perl: 98; pascal: 69; makefile: 3
file content (15 lines) | stat: -rw-r--r-- 319 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use Test2::V0;
use Syntax::Keyword::Assert;

use lib 't/lib';
use TestUtil;

use Test2::Require::Module 'feature' => '1.58';

use experimental 'isa';

my $obj = bless {}, 'Foo';
ok lives { assert($obj isa Foo) };
is dies { assert($obj isa Bar) }, match qr/Assertion failed \(Foo=HASH\(.+\) isa "Bar"\)/;

done_testing;