File: undef.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 (17 lines) | stat: -rw-r--r-- 411 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl -w

use strict;
use Test::More qw(no_plan);
use Set::Object qw(set);

my $set = set();
$set->remove(undef);
pass("didn't segfault removing undef from an empty set");

$set->insert(undef);
is($set->size, 0, "set ignores undef as a member");

my $removed = $set->remove(undef);
is($removed, 0, "undef can never exist in a set");

is($set->includes(undef), '', "undef is never included in a set");