projects
/
pkg-perl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add the following packages libalgorithm-diff-perl libspiffy-perl libtext-diff-perl...
[pkg-perl]
/
deb-src
/
libspiffy-perl
/
libspiffy-perl-0.30
/
t
/
new.t
1
use lib 't';
2
use strict;
3
use warnings;
4
package A;
5
use Spiffy -base;
6
field 'x';
7
field 'y';
8
9
package main;
10
use Test::More tests => 6;
11
12
my $a1 = A->new;
13
ok(not defined $a1->x);
14
ok(not defined $a1->y);
15
my $a2 = A->new(x => 5);
16
is($a2->x, 5);
17
ok(not defined $a2->y);
18
my $a3 = A->new(x => 15, y => 10);
19
is($a3->x, 15);
20
is($a3->y, 10);