File: unique.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 (32 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (9)
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
use Set::Object;

print "1..4\n";

my $a = Set::Object->new("a".."e");
my $b = Set::Object->new("c".."g");
my $c = Set::Object->new();

my $d = $a->unique($b);

print "not " unless $d eq "Set::Object(a b f g)";
print "ok 1\n";

my $e = $b->unique($a);

print "not " unless $e eq "Set::Object(a b f g)";
print "ok 2\n";

my $f = $a->unique($c);

print "not " unless $f eq $a;
print "ok 3\n";

my $g = $a->unique($a);

print "not " unless $g eq "Set::Object()";
print "ok 4 # $g\n";