[libchamplain] Implement champlain_layer_add_marker()



commit e67a5947fd9ea395af90f39e3026bac8d496860c
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date:   Wed Jul 29 21:10:45 2009 +0200

    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 deletions(-)
---
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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]