File: 080_Trait_SUPER2_test.t

package info (click to toggle)
libclass-trait-perl 0.31-1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 364 kB
  • ctags: 156
  • sloc: perl: 2,467; makefile: 46
file content (23 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl

# Tests the class inherited from traited class which trait uses SUPER

use strict;
use warnings;

use Test::More tests => 3;

BEGIN {
    unshift @INC => ( 't/test_lib', '/test_lib' );
}

use Employee;

my $pt = PersonWithTitle->new;
my $e  = Employee->new;
my $p  = Person->new;

is( $pt->name, 'Mgr. George Richardson' );
is( $p->name,  'George Richardson' );
is( $e->name,  'Mgr. George Richardson' );