From: Emmanuel Rodriguez Date: Wed, 29 Jul 2009 19:20:12 +0000 (+0200) Subject: Coverage for Champlain::Layer. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64b29a0f28fc0ae5808030b0234fd2ebdf2729bb;p=libchamplain Coverage for Champlain::Layer. Add the functions: - champlain_layer_hide - champlain_layer_show - champlain_layer_remove_marker --- 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);