Add tests for memory leaks and weaken for Issue #81
[bioperl-live.git] / t / PopGen / TagHaplotype.t
blob3b322bb3f8d094ff0d6f746f9189d09dd9205e5b
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN { 
7     use lib '.';
8     use Bio::Root::Test;
9     
10     test_begin(-tests => 3);
11         
12     use_ok('Bio::PopGen::TagHaplotype');
15 my $hap = [
16              [qw/0       0       0/],
17              [qw/1       1       1/],
18              [qw/0       0       1/],
19              [qw/1       2       1/]
20           ];
22 my $obj = Bio::PopGen::TagHaplotype->new(-haplotype_block => $hap);
25 # check haplotype length 
26 is( $obj->tag_length ,1); # Tag length for this set must be 1
28 # check the tag list
29 is( (join ' ', @{($obj->tag_list)->[0]}) ,'1 2'); # the SNPs are 1 and 2 (1 2)
31 # TODO? is this really enough tests?!