File: flags.t

package info (click to toggle)
libset-object-perl 1.42-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 620 kB
  • sloc: perl: 1,069; makefile: 14
file content (39 lines) | stat: -rw-r--r-- 682 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
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/perl -w
#
#  check that objects retain things like overloading after going in
#  and out of Set::Object containers
#

use strict;

use Set::Object;

require './t/object/Person.pm';
require './t/object/Saint.pm';

print "1..2\n";

my $person = new Person( firstname => "Montgomery", name => "Burns" );

my $set = Set::Object->new($person);

my ($newperson) = $set->members();

if ($newperson ne "Montgomery Burns") {
    print "not ";
}
print "ok 1\n";

my $saint = Saint->new( firstname => "Timothy", name => "Leary" );

$set = Set::Object->new($saint);

my ($newsaint) = $set->members();

if ($newsaint ne "Saint Timothy Leary") {
    print "not ";
}

print "ok 2\n";