File: misc.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 (25 lines) | stat: -rw-r--r-- 628 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
use Set::Object;

print "1..2\n";

{
	# Malcolm Purvis <malcolm.purvis@alcatel.com.au>
	my $s1 = Set::Object->new("A");
	my $s1_again = Set::Object->new("A");
	my $s2 = $s1->union($s1_again);
	my $s3 = Set::Object->new("C");
	my $s4 = $s2->difference($s3);
	print "not " unless $s4 eq "Set::Object(A)";
	print "ok 1\n";
}

{
	# Malcolm Purvis <malcolm.purvis@alcatel.com.au>
	my $s1 = Set::Object->new(("A", "B"));
	my $s1_again = Set::Object->new(("A", "B"));
	my $s2 = $s1->union($s1_again);  
	my $s3 = Set::Object->new("C");
	my $s4 = $s2->difference($s3);
	print "not " unless $s4 eq "Set::Object(A B)";
	print "ok 2\n";
}