File: export1.t

package info (click to toggle)
libspiffy-perl 0.21-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 256 kB
  • ctags: 99
  • sloc: perl: 1,067; makefile: 50
file content (28 lines) | stat: -rw-r--r-- 738 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package Foo;
use strict;
use Test::More tests => 20;
use lib 't';
use Something;

ok(not defined &Foo::import);
ok(defined &Foo::thing);
ok(ref(thing) eq 'Something');
ok(thing()->can('cool'));
ok(thing()->isa('Something'));
ok(thing()->isa('Thing'));
ok(thing()->isa('Spiffy'));
is(join('-', @Foo::ISA), '');
ok(not defined &Foo::field);
ok(not defined &Foo::spiffy_constructor);

ok(not defined &Something::import);
ok(defined &Something::thing);
ok(defined &Something::field);
ok(not defined &Something::spiffy_constructor);
is(join('-', @Something::ISA), 'Thing');

ok(not defined &Thing::import);
ok(defined &Thing::thing);
ok(defined &Thing::field);
ok(not defined &Thing::spiffy_constructor);
is(join('-', @Thing::ISA), 'Spiffy');