moved things over to BioSeqI
[bioperl-live.git] / t / Sigcleave.t
blob01fbe4f8613ba168a7a4d65580668d0cb026b438
1 ## Bioperl Test Harness Script for various modules
2 ## $Id$
4 # Before `make install' is performed this script should be runnable with
5 # `make test'. After `make install' it should work as `perl test.t'
8 ## We start with some black magic to print on failure.
9 BEGIN { $| = 1; print "1..4\n"; 
10         use vars qw($loaded); }
11 END {print "not ok 1\n" unless $loaded;}
13 use lib '../';
14 use Bio::Tools::Sigcleave;
16 $loaded = 1;
17 print "ok 1\n";    # 1st test passes.
19 ## End of black magic.
21 ## Insert additional test code below but remember to change
22 ## the print "1..x\n" in the BEGIN block to reflect the
23 ## total number of tests that will be run. 
25 sub test ($$;$) {
26     my($num, $true,$msg) = @_;
27     print($true ? "ok $num\n" : "not ok $num $msg\n");
30 $protein = 'MTMDKSELVQKAKLAEQAERYDDMAAAMKAVTEQGHELSNEERNLLSVAYKNVVGARRSSWRVISSIEQKTERNEKKQQMGKEYREKIEAELQDICNDVLELLDKYLIPNATQPESKVFYLKMKGDYFRYLSEVASGDNKQTTVSNSQQAYQEAFEISKKEMQPTHPIRLGLALNFSVFYYEILNSPEKACSLAKTAFDEAIAELDTLNEESYKDSTLIMQLLRDNLTLWTSENQGDEGDAGEGEN';
32 ## need this to escape the strict() warnings...
33 $formatted_output = "";
34 my %results;
36 # Build object
37 test 2, $sigcleave_object = new Bio::Tools::Sigcleave(-id         =>'test_sigcleave_seq',
38                                                       -type      =>'amino',
39                                                       -threshold => 0,
40                                                       -seq       =>$protein); 
41 # Test raw result accessor
42 test 3, %results = $sigcleave_object->signals, "unable to get raw sigcleave results";
44 # Test formatted output method
45 test 4, $formatted_output = $sigcleave_object->pretty_print, "unable to pretty print sigcleave results";
48 ## More tests