[libchamplain] Coverage for Champlain::Layer.
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libchamplain] Coverage for Champlain::Layer.
- Date: Fri, 31 Jul 2009 23:45:03 +0000 (UTC)
commit 64b29a0f28fc0ae5808030b0234fd2ebdf2729bb
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date: Wed Jul 29 21:20:12 2009 +0200
Coverage for Champlain::Layer.
Add the functions:
- champlain_layer_hide
- champlain_layer_show
- champlain_layer_remove_marker
bindings/perl/Champlain/t/ChamplainLayer.t | 8 +++++++-
bindings/perl/Champlain/xs/ChamplainLayer.xs | 12 ++++++++++++
2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/bindings/perl/Champlain/t/ChamplainLayer.t b/bindings/perl/Champlain/t/ChamplainLayer.t
index 8ff8fad..1831914 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 => 3;
+use Clutter::TestHelper tests => 6;
use Champlain;
@@ -26,5 +26,11 @@ sub tests {
"Layer has a marker after add_marker"
);
+ ok(!$layer->get('visible'), "Layer is not visible at start");
+ $layer->show();
+ ok($layer->get('visible'), "show()");
+ $layer->hide();
+ ok(!$layer->get('visible'), "hide()");
+
return 0;
}
diff --git a/bindings/perl/Champlain/xs/ChamplainLayer.xs b/bindings/perl/Champlain/xs/ChamplainLayer.xs
index 5f96a63..7872ebc 100644
--- a/bindings/perl/Champlain/xs/ChamplainLayer.xs
+++ b/bindings/perl/Champlain/xs/ChamplainLayer.xs
@@ -11,3 +11,15 @@ champlain_layer_new (class)
void
champlain_layer_add_marker (ChamplainLayer *layer, ChamplainBaseMarker *marker);
+
+
+void
+champlain_layer_hide (ChamplainLayer *layer);
+
+
+void
+champlain_layer_show (ChamplainLayer *layer);
+
+
+void
+champlain_layer_remove_marker (ChamplainLayer *layer, ChamplainBaseMarker *marker);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]