~ubuntu-branches/ubuntu/oneiric/bioperl/oneiric

« back to all changes in this revision

Viewing changes to t/game.t

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2007-09-21 22:52:22 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070921225222-tt20m2yy6ycuy2d8
Tags: 1.5.2.102-1
* Developer release.
* Upgraded source package to debhelper 5 and standards-version 3.7.2.
* Added libmodule-build-perl and libtest-harness-perl to
  build-depends-indep.
* Disabled automatic CRAN download.
* Using quilt instead of .diff.gz to manage modifications.
* Updated Recommends list for the binary package.
* Moved the "production-quality" scripts to /usr/bin/.
* New maintainer: Debian-Med packaging team mailing list.
* New uploaders: Charles Plessy and Steffen Moeller.
* Updated Depends, Recommends and Suggests.
* Imported in Debian-Med's SVN repository on Alioth.
* Executing the regression tests during package building.
* Moved the Homepage: field out from the package's description.
* Updated watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*-Perl-*-
2
2
## Bioperl Test Harness Script for Modules
3
 
## $Id: game.t,v 1.19 2003/12/16 16:58:51 smckay Exp $
 
3
## $Id: game.t,v 1.21 2004/02/27 20:20:53 smckay Exp $
4
4
 
5
5
# Before `make install' is performed this script should be runnable with
6
6
# `make test'. After `make install' it should work as `perl test.t'
20
20
    }
21
21
    use Test;
22
22
    use vars qw($TESTCOUNT);
23
 
    $TESTCOUNT = 25;
 
23
    $TESTCOUNT = 23;
24
24
    plan tests => $TESTCOUNT;
25
25
    
26
26
    $error  = 0;
76
76
ok($seq->length, 28735);
77
77
ok($seq->species->binomial, 'Caenorhabditis elegans');
78
78
my @feats = $seq->get_SeqFeatures;
79
 
ok(scalar(@feats), 10);
 
79
ok(scalar(@feats), 7);
80
80
my $source = grep { $_->primary_tag eq 'source' } @feats;
81
81
ok($source);
82
82
my @genes = grep { $_->primary_tag eq 'gene' } @feats;
89
89
ok($gname, 'C02D5.3');
90
90
ok($genes[0]->strand, 1);
91
91
my $cds   = grep { $_->primary_tag eq 'CDS' } @feats;
92
 
my $mRNA  = grep { $_->primary_tag eq 'mRNA' } @feats;
93
92
ok($cds, 3);
94
 
ok($mRNA, 3);
95
93
 
96
 
# make sure we can read waht we write
 
94
# make sure we can read what we write
97
95
# test XML-writing
98
96
my $testfile = "testgameout.game";
99
 
my $out = new Bio::SeqIO(-format => 'game', -file => ">$testfile");
 
97
# map argument is require to write a <map_position> element
 
98
my $out = new Bio::SeqIO(-format => 'game', -file => ">$testfile", -map => 1);
100
99
$out->write_seq($seq);
101
100
$out->close();
102
101
 
111
110
 
112
111
my $genes = grep { $_->primary_tag eq 'gene' } @feats;
113
112
$cds   = grep { $_->primary_tag eq 'CDS' } @feats;
114
 
$mRNA  = grep { $_->primary_tag eq 'mRNA' } @feats;
115
113
ok($genes, 3);
116
114
ok($cds, 3);
117
 
ok($mRNA, 3);
118
115
unlink $testfile;
119
116