From: Emmanuel Rodriguez Date: Wed, 29 Jul 2009 19:10:45 +0000 (+0200) Subject: Implement champlain_layer_add_marker() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e67a5947fd9ea395af90f39e3026bac8d496860c;p=libchamplain Implement champlain_layer_add_marker() --- diff --git a/bindings/perl/Champlain/t/ChamplainLayer.t b/bindings/perl/Champlain/t/ChamplainLayer.t index d8cb352..8ff8fad 100644 --- a/bindings/perl/Champlain/t/ChamplainLayer.t +++ b/bindings/perl/Champlain/t/ChamplainLayer.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Clutter::TestHelper tests => 1; +use Clutter::TestHelper tests => 3; use Champlain; @@ -12,5 +12,19 @@ exit tests(); sub tests { my $layer = Champlain::Layer->new(); isa_ok($layer, 'Champlain::Layer'); + + my $marker = Champlain::BaseMarker->new(); + is_deeply( + [$layer->get_children], + [], + "No children at start" + ); + $layer->add_marker($marker); + is_deeply( + [$layer->get_children], + [$marker], + "Layer has a marker after add_marker" + ); + return 0; } diff --git a/bindings/perl/Champlain/xs/ChamplainLayer.xs b/bindings/perl/Champlain/xs/ChamplainLayer.xs index 46d3e01..5f96a63 100644 --- a/bindings/perl/Champlain/xs/ChamplainLayer.xs +++ b/bindings/perl/Champlain/xs/ChamplainLayer.xs @@ -8,3 +8,6 @@ ChamplainLayer* champlain_layer_new (class) C_ARGS: /* No args */ + +void +champlain_layer_add_marker (ChamplainLayer *layer, ChamplainBaseMarker *marker);