File: 53croak-override.t

package info (click to toggle)
libobject-pad-perl 0.823-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 944 kB
  • sloc: ansic: 3,404; perl: 3,372; pascal: 28; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 372 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl

use v5.18;
use warnings;

use Test2::V0;

use Object::Pad 0.800;

{
   ok( !eval <<'EOPERL',
   class Example {
      method thing :override { }
   }
EOPERL
      'method :override without matching superclass method fails' );
   like( $@, qr/^Superclass does not have a method named 'thing'/,
      'message from failure of :override' );
}

done_testing;