~ubuntu-branches/ubuntu/raring/bioperl/raring

« back to all changes in this revision

Viewing changes to t/TagHaplotype.t

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2008-03-18 14:44:57 UTC
  • mfrom: (4 hardy)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20080318144457-1jjoztrvqwf0gruk
* debian/control:
  - Removed MIA Matt Hope (dopey) from the Uploaders field.
    Thank you for your work, Matt. I hope you are doing well.
  - Downgraded some recommended package to the 'Suggests' priority,
    according to the following discussion on Upstream's mail list.
    http://bioperl.org/pipermail/bioperl-l/2008-March/027379.html
    (Closes: #448890)
* debian/copyright converted to machine-readable format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*-Perl-*-
 
2
## Bioperl Test Harness Script for Modules
 
3
 
 
4
use strict;
 
5
BEGIN {
 
6
    # to handle systems with no installed Test module
 
7
    # we include the t dir (where a copy of Test.pm is located)
 
8
    # as a fallback
 
9
    eval { require Test; };
 
10
    if( $@ ) { 
 
11
        use lib 't';
 
12
    }
 
13
    use Test;
 
14
 
 
15
    plan tests => 2;
 
16
}
 
17
 
 
18
use Bio::PopGen::TagHaplotype;
 
19
 
 
20
my $hap = [
 
21
             [qw/0       0       0/],
 
22
             [qw/1       1       1/],
 
23
             [qw/0       0       1/],
 
24
             [qw/1       2       1/]
 
25
          ];
 
26
 
 
27
my $obj = Bio::PopGen::TagHaplotype -> new(-haplotype_block => $hap);
 
28
 
 
29
 
 
30
# check haplotype length 
 
31
ok( $obj->tag_length ,1); # Tag length for this set must be 1
 
32
 
 
33
# check the tag list
 
34
ok( (join ' ', @{($obj->tag_list)->[0]}) ,'1 2'); # the SNPs are 1 and 2 (1 2)