Newer
Older
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
use strict;
use warnings;
use lib 't';
use Bio::EnsEMBL::CoordSystem;
use TestUtils qw(debug test_getter_setter);
our $verbose = 0;
BEGIN { $| = 1;
use Test;
plan tests => 8;
}
my $name = 'chromosome';
my $version = 'NCBI33';
my $dbID = 1;
my $top_level = 1;
my $sequence_level = 0;
my $default = 1;
#
# Test constructor
#
my $coord_system = Bio::EnsEMBL::CoordSystem->new
(-NAME => $name,
-VERSION => $version,
-DBID => $dbID,
-TOP_LEVEL => $top_level,
-SEQUENCE_LEVEL => $sequence_level,
-DEFAULT => 1);
ok($coord_system && $coord_system->isa('Bio::EnsEMBL::CoordSystem'));
#
# Test name()
#
ok($coord_system->name() eq $name);
#
# Test version()
#
ok($coord_system->version() eq $version);
#
# Test is_top_level()
#
ok($coord_system->is_top_level());
#
# Test is_sequence_level()
#
ok(!$coord_system->is_sequence_level());
#
# Test is_default()
#
ok($coord_system->is_default());
#
# Test equals()
#
my $coord_system2 = Bio::EnsEMBL::CoordSystem->new
(-NAME => $name,
-VERSION => $version,
-DBID => 123,
-TOP_LEVEL => $top_level);
ok($coord_system->equals($coord_system2));
$coord_system2 = Bio::EnsEMBL::CoordSystem->new
(-NAME => 'chromosome',
-VERSION => 'NCBI34',
-DBID => 123,
-TOP_LEVEL => $top_level);
ok(!$coord_system->equals($coord_system2));