cleanup and convert to Test::More
[bioperl-live.git] / t / Primer.t
blobd45e55f84d58574e0a3bbc720fcc76833a0580c7
1 ## $Id$
3 # test for Bio::SeqFeature::Primer
4 # written by Rob Edwards
6 use strict;
7 use constant NUMTESTS => 18;
9 BEGIN {
10     eval { require Test::More; };
11     if( $@ ) {
12         use lib 't/lib';
13     }
14     use Test::More;
16     plan tests => NUMTESTS;
17     use_ok('Bio::SeqFeature::Primer');
20 my ($primer, $location, $start, $end, $strand, $id, $tm, $tme);
22 ok $primer=Bio::SeqFeature::Primer->new(-seq=>'CTTTTCATTCTGACTGCAACG');
23 is $primer->seq->seq, "CTTTTCATTCTGACTGCAACG";
24 is $primer->primary_tag, "Primer";
25 ok $location=$primer->location(500);
26 is $location,500;
27 ok $start=$primer->start(2);
28 is $start, 2;
29 ok $end=$primer->end(19);
30 is $end, 19;
31 ok $strand=$primer->strand(-1);
32 is $strand, -1;
33 ok $id=$primer->display_id('test');
34 is $id, "test";
35 ok $tm = $primer->Tm;
36 ok $tme = $primer->Tm_estimate;
37 is int($tm), 52;
38 is int($tme), 58;