Commit b766f062 authored by Andy Yates's avatar Andy Yates
Browse files

Improved error checking

parent 6764a00d
use strict;
use warnings;
use Test::More tests => 63;
use Test::More tests => 64;
use Bio::EnsEMBL::Test::TestUtils;
use IO::String;
use Bio::EnsEMBL::Test::MultiTestDB;
use Bio::EnsEMBL::Slice;
use Bio::EnsEMBL::ProjectionSegment;
......@@ -102,9 +102,17 @@ ok($sub_slice->invert()->seq() eq 'ATGCA');
# test that slice can be created without db, seq or coord system
$test_slice = Bio::EnsEMBL::Slice->new('-seq_region_name' => 'test',
'-start' => 1,
'-end' => 3);
{
my $warnings = q{};
my $new_stderr = IO::String->new(\$warnings);
my $oldfh = select(STDERR);
local *STDERR = $new_stderr;
$test_slice = Bio::EnsEMBL::Slice->new('-seq_region_name' => 'test',
'-start' => 1,
'-end' => 3);
my $check = qr/MSG: Slice without coordinate system/;
like($warnings, $check, 'Checking we are still warning about lack of coordinate system');
}
ok($test_slice);
ok($test_slice->seq() eq 'NNN');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment