From e67a5947fd9ea395af90f39e3026bac8d496860c Mon Sep 17 00:00:00 2001 From: Emmanuel Rodriguez Date: Wed, 29 Jul 2009 21:10:45 +0200 Subject: [PATCH] Implement champlain_layer_add_marker() --- bindings/perl/Champlain/t/ChamplainLayer.t | 16 +++++++++++++++- bindings/perl/Champlain/xs/ChamplainLayer.xs | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) 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); -- 2.39.5