Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Better, cleaner warnings in tests.
  • Loading branch information
daisieh committed Aug 23, 2012
1 parent c697dae commit 86f4715
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions t/Hyphy.t
Expand Up @@ -9,6 +9,7 @@ BEGIN {
use Bio::Root::Test;
test_begin(-tests => 8, -requires_module =>'IO::String');


use_ok('Bio::Tools::Run::Phylo::Hyphy::SLAC');
use_ok('Bio::Tools::Run::Phylo::Hyphy::FEL');
use_ok('Bio::Tools::Run::Phylo::Hyphy::REL');
Expand All @@ -28,39 +29,40 @@ SKIP: {

my $aln = $alignio->next_aln;
my $tree = $treeio->next_tree;
my $debug = test_debug();

$slac->alignment($aln);
$slac->tree($tree);
my ($rc,$results) = $slac->run();
if ($rc == 0) {
self->warn("ERROR in SLAC module $rc:" . $slac->error_string() . "\n");
if (($rc == 0) && ($debug == 1)){
warn("ERROR in SLAC module $rc:" . $slac->error_string() . "\n");
}
ok ($rc != 0, "SLAC module");

my $rel = Bio::Tools::Run::Phylo::Hyphy::REL->new();
$rel->alignment($aln);
$rel->tree($tree);
($rc,$results) = $rel->run();
if ($rc == 0) {
self->warn(print "ERROR in REL module $rc:" . $rel->error_string() . "\n");
if (($rc == 0) && ($debug == 1)){
warn(print "ERROR in REL module $rc:" . $rel->error_string() . "\n");
}
ok ($rc != 0, "REL module");

my $fel = Bio::Tools::Run::Phylo::Hyphy::FEL->new();
$fel->alignment($aln);
$fel->tree($tree);
($rc,$results) = $fel->run();
if ($rc == 0) {
self->warn("ERROR in FEL module $rc:" . $fel->error_string() . "\n");
if (($rc == 0) && ($debug == 1)){
warn("ERROR in FEL module $rc:" . $fel->error_string() . "\n");
}
ok ($rc != 0, "FEL module");

my $modeltest = Bio::Tools::Run::Phylo::Hyphy::Modeltest->new();
$modeltest->alignment($aln);
$modeltest->tree($tree);
($rc,$results) = $modeltest->run();
if ($rc == 0) {
self->warn("ERROR in Modeltest module $rc:" . print $modeltest->error_string() . "\n");
if (($rc == 0) && ($debug == 1)){
warn("ERROR in Modeltest module $rc:" . print $modeltest->error_string() . "\n");
}
ok ($rc != 0, "Modeltest module");

Expand Down

0 comments on commit 86f4715

Please sign in to comment.