[BUG] bug 2598
[bioperl-live.git] / t / IUPAC.t
bloba3d8f1ee4a4b910695451403e644e93b22e26af0
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 => 4);
11         
12         use_ok('Bio::Tools::IUPAC');
13         use_ok('Bio::Seq');
16 # test IUPAC
18 my $ambiseq = Bio::Seq->new(-seq => 'ARTCGTTGR',
19                             -alphabet => 'dna'); 
21 my $stream  = Bio::Tools::IUPAC->new('-seq' => $ambiseq);
22 is $stream->count(), 4;
24 my $b = 1; 
25 while (my $uniqueseq = $stream->next_seq()) {
26     if( ! $uniqueseq->isa('Bio::Seq') ) {
27         $b = 0;
28         last; # no point continuing if we get here
29     }
31 ok $b;