fix subversion tags
[bioperl-live.git] / t / SimilarityPair.t
blobcb5d4504d20c696db7afdc96bbff76db0fb83e10
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {     
7     use lib 't/lib';
8     use BioperlTest;
9     
10     test_begin(-tests => 12);
11         
12         use_ok('Bio::SearchIO');
13         use_ok('Bio::SeqIO');
16 # test SimilarityPair
18 ok my $seq = (Bio::SeqIO->new('-format' => 'fasta',
19                           '-file' => test_input_file('AAC12660.fa')))->next_seq();
20 isa_ok $seq, 'Bio::SeqI';
21 ok my $blast = Bio::SearchIO->new('-file'=>test_input_file('blast.report'), '-format' => 'blast');
22 isa_ok $blast, 'Bio::SearchIO';
23 my $r = $blast->next_result;
24 ok my $hit = $r->next_hit;
25 isa_ok $hit, 'Bio::Search::Hit::HitI';
26 ok my $sim_pair = $hit->next_hsp;
27 isa_ok $sim_pair, 'Bio::SeqFeatureI';
28 ok $seq->add_SeqFeature($sim_pair);
29 is $seq->all_SeqFeatures(), 1;