Skip to content
Snippets Groups Projects
Commit ac4fd78d authored by Zhicheng Liu's avatar Zhicheng Liu
Browse files

Use cmp_deeply for testing if two references are pointing to the same object

Hope this time it works with differnt versions of Perl.

Also change file permissions back to 644.
parent 0815ab9a
No related branches found
No related tags found
2 merge requests!194Return all adaptors in the registry in get_all_DBAdaptors if no args …,!194Return all adaptors in the registry in get_all_DBAdaptors if no args …
File mode changed from 100755 to 100644
......@@ -18,6 +18,7 @@ use warnings;
use Config;
use Test::More;
use Test::Deep;
use Test::Warnings;
use Test::Exception;
use File::Temp qw/tempfile/;
......@@ -130,7 +131,7 @@ ok(scalar(@{ $reg->get_all_species('cahoona') }) == 0, "get_all_species with bog
# Test get_all_DBAdaptors
my $registry_register_dba = $Bio::EnsEMBL::Registry::registry_register{'_DBA'};
is( scalar(@{$reg->get_all_DBAdaptors()}), scalar(@{$registry_register_dba}), "get_all_DBAdaptors() on all species and groups" );
is( $reg->get_all_DBAdaptors(), $registry_register_dba, "get_all_DBAdaptors() on all species and groups: comparing references" );
cmp_deeply( $reg->get_all_DBAdaptors(), shallow($registry_register_dba), "get_all_DBAdaptors() on all species and groups: comparing references" );
ok(scalar(@{$reg->get_all_DBAdaptors(-SPECIES => $species[0])}), "get_all_DBAdaptors() on a valid species");
warns_like(
sub { is(scalar(@{$reg->get_all_DBAdaptors(-SPECIES => 'cahoona')}), 0, "get_all_DBAdaptors() on a non-existing species"); },
......
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