1# 00-basic.t
2#
3# Test suite for Set::Partition
4# Make sure the basic stuff works
5#
6# copyright (C) 2006 David Landgren
7
8use strict;
9
10eval qq{ use Test::More tests => 6 };
11if( $@ ) {
12    warn "# Test::More not available, no tests performed\n";
13    print "1..1\nok 1\n";
14    exit 0;
15}
16
17use Set::Partition;
18
19my $Unchanged = 'The scalar remains the same';
20$_ = $Unchanged;
21
22diag( "testing Set::Partition v$Set::Partition::VERSION" );
23
24{
25    my $t = Set::Partition->new;
26    ok( defined($t), 'new() defines ...' );
27    ok( ref($t) eq 'Set::Partition', '... a Set::Partition object' );
28
29    my $r = $t->next;
30    ok( !defined($r), 'cannot arrange nothing' );
31}
32
33SKIP: {
34    skip( 'Test::Pod not installed on this system', 1 )
35        unless do {
36            eval "use Test::Pod";
37            $@ ? 0 : 1;
38        };
39
40    pod_file_ok( 'Partition.pm' );}
41
42SKIP: {
43    skip( 'Test::Pod::Coverage not installed on this system', 1 )
44        unless do {
45            eval "use Test::Pod::Coverage";
46            $@ ? 0 : 1;
47        };
48    pod_coverage_ok( 'Set::Partition', 'POD coverage is go!' );
49}
50
51cmp_ok( $_, 'eq', $Unchanged, '$_ has not been altered' );
52