From: Emmanuel Rodriguez Date: Wed, 16 Sep 2009 17:57:46 +0000 (+0200) Subject: Adjust the unit tests to libchamplain 0.4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4b5eafb45e222e8f2dcbc1bf6767ee958a29d24;p=libchamplain Adjust the unit tests to libchamplain 0.4 - OAM (OpenAerialMap) is now optional. - $tile->get_uri returns undef instead of '' when a tile is initialized. - $tile->get_filename returns undef instead of '' when a tile is initialized. --- diff --git a/bindings/perl/Champlain/t/ChamplainMapSource.t b/bindings/perl/Champlain/t/ChamplainMapSource.t index ddc00b7..fbaacd8 100644 --- a/bindings/perl/Champlain/t/ChamplainMapSource.t +++ b/bindings/perl/Champlain/t/ChamplainMapSource.t @@ -85,6 +85,15 @@ sub test_osm_osmarender { sub test_oam { my $label = "OpenAerialMap"; my $map = get_oam(); + + if (! defined $map) { + # The map source is now gone + SKIP: { + skip "The map source $label is no longer available", 33; + }; + return; + } + isa_ok($map, 'Champlain::MapSource'); # Map identification @@ -232,8 +241,8 @@ sub generic_map_operations { my $tile = Champlain::Tile->new(); is($tile->get_size(), 0, "get_size() default tile"); is($tile->get_state(), 'init', "get_state() default tile"); - is($tile->get_uri(), '', "get_uri() default tile"); - is($tile->get_filename(), '', "get_filename() default tile"); + is($tile->get_uri(), undef, "get_uri() default tile"); + is($tile->get_filename(), undef, "get_filename() default tile"); $map->fill_tile($tile); is($tile->get_size(), $map->get_tile_size, "size is filled"); is($tile->get_state(), 'loading', "state changed");