]> err.no Git - libchamplain/commitdiff
Implement champlain_layer_add_marker()
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Wed, 29 Jul 2009 19:10:45 +0000 (21:10 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Fri, 31 Jul 2009 21:12:08 +0000 (17:12 -0400)
bindings/perl/Champlain/t/ChamplainLayer.t
bindings/perl/Champlain/xs/ChamplainLayer.xs

index d8cb3526974ac078363641c8f2174466d46a42ad..8ff8fad80ebcafecb5eb556e1e35ff9cb2558af7 100644 (file)
@@ -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;
 }
index 46d3e01773e4b66b78dc6abe3a1d91accc0cd92b..5f96a63f830d0ef3a554ae802b1b511214e928ca 100644 (file)
@@ -8,3 +8,6 @@ ChamplainLayer*
 champlain_layer_new (class)
        C_ARGS: /* No args */
 
+
+void
+champlain_layer_add_marker (ChamplainLayer *layer, ChamplainBaseMarker *marker);