Used quoted strings in Bio::Species to avoid a 'Invalid [] range in regex' error...
[bioperl-live.git] / t / Tree / RandomTreeFactory.t
blob81e76234ed1d248e02d7d430af428a952b930d55
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 => 5);
11     
12         use_ok('Bio::Tree::RandomFactory');
13     use_ok('Bio::TreeIO');
14     use_ok('Bio::Tree::Statistics');
17 my $FILE1 = test_output_file();
19 my $ssize = 5;
20 my $factory = Bio::Tree::RandomFactory->new(-sample_size => $ssize);
21 my $stats = Bio::Tree::Statistics->new();
23 my $tree = $factory->next_tree;
25 is($tree->get_nodes, ($ssize * 2 - 1));
27 my $treeio = Bio::TreeIO->new(-format => 'newick', -file => ">$FILE1");
29 $treeio->write_tree($tree);
30 undef $treeio;
32 ok(-s $FILE1);