1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
# -*-Perl-*-
## Bioperl Test Harness Script for Modules
## $Id: trim.t,v 1.4 2002/10/30 14:21:59 heikki Exp $
#
#####
#
# this test script tests working within the chromat_dir,phd_dir,edit_dir structure
# it also tests the ability of Trim.pm to do its thing
#
#####
use strict;
#require 'dumpvar.pl';
BEGIN {
# to handle systems with no installed Test module
# we include the t dir (where a copy of Test.pm is located)
# as a fallback
eval { require Test; };
if( $@ ) {
use lib 't';
}
use Test;
plan tests => 7;
}
my $DEBUG = $ENV{'BIOPERLDEBUG'};
print("Checking if the Bio::Tools::Alignment::Consed module could be used...\n") if($DEBUG);
use Bio::Tools::Alignment::Consed;
use Bio::Root::IO;
ok(1);
print("Checking if the Bio::Tools::Alignment::Trim module could be used...\n") if $DEBUG;
use Bio::Tools::Alignment::Trim;
ok(1);
# scope some variables
my($o_consed,@singlets,@singletons,@pairs,@doublets,@multiplets,$invoker);
# instantiate a new object
$o_consed = Bio::Tools::Alignment::Consed->new( -acefile =>Bio::Root::IO->catfile("t","data","consed_project","edit_dir","test_project.fasta.screen.ace.1"));
print("Checking if a new CSM::Consed object was created...\n") if( $DEBUG);
ok defined $o_consed;
# set the verbosity to a valid value (0)
my $verbosity = $o_consed->set_verbose(0);
#
print("Checking if the new object is a reference to a Bio::Tools::Alignment::Consed object...\n") if($DEBUG);
# test 3
ok ref($o_consed),'Bio::Tools::Alignment::Consed';
print("Checking if singlets can be successfully set...\n") if ($DEBUG);
# test 4
$invoker = $o_consed->set_singlets("verbosely");
ok $invoker != 1;
print("Checking if singlets quality can be set...\n") if ($DEBUG);
ok !($o_consed->set_singlet_quality());
print("Checking if singlet and singleton qualities can be set...\n") if( $DEBUG);
ok !($o_consed->set_trim_points_singlets_and_singletons());
|