fix deprecated usage warnings for perl 5.16
[bioperl-live.git] / t / Phenotype / Measure.t
blobc7a1c0776aebbc239a3cf8f76e30c517dfeca880
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id$
4 use strict;
6 BEGIN {
7     use lib '.';
8     use Bio::Root::Test;
9     
10     test_begin(-tests => 21);
11         
12     use_ok 'Bio::Phenotype::Measure';
14   
15 my $measure = Bio::Phenotype::Measure->new( -context     => "height",
16                                             -description => "desc",
17                                             -start       => 10,
18                                             -end         => 150,
19                                             -unit        => "cm",
20                                             -comment     => "comment" );
22 isa_ok( $measure, "Bio::Phenotype::Measure" );
24 ok( $measure->to_string() );
26 is( $measure->context(), "height" );
27 is( $measure->description(), "desc" );
28 is( $measure->start(), 10 );
29 is( $measure->end(), 150 );
30 is( $measure->unit(), "cm" );
31 is( $measure->comment(), "comment" );
33 $measure->init();
35 is( $measure->context(), "" );
36 is( $measure->description(), "" );
37 is( $measure->start(), "" );
38 is( $measure->end(), "" );
39 is( $measure->unit(), "" );
40 is( $measure->comment(), "" );
42 is( $measure->context( "A" ), "A" );
43 is( $measure->description( "B" ), "B" );
44 is( $measure->start( "C" ), "C" );
45 is( $measure->end( "D" ), "D" );
46 is( $measure->unit( "E" ), "E" );
47 is( $measure->comment( "F" ), "F" );