]> err.no Git - libchamplain/commitdiff
Coverage for Champlain::Layer.
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Wed, 29 Jul 2009 19:20:12 +0000 (21:20 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Fri, 31 Jul 2009 21:12:09 +0000 (17:12 -0400)
Add the functions:
  - champlain_layer_hide
  - champlain_layer_show
  - champlain_layer_remove_marker

bindings/perl/Champlain/t/ChamplainLayer.t
bindings/perl/Champlain/xs/ChamplainLayer.xs

index 8ff8fad80ebcafecb5eb556e1e35ff9cb2558af7..1831914b46661e2bbae7f055ac4f663f2802ffc8 100644 (file)
@@ -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;
 }
index 5f96a63f830d0ef3a554ae802b1b511214e928ca..7872ebc7e99da9ec24a9528a36780319849d92f9 100644 (file)
@@ -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);