From 64b29a0f28fc0ae5808030b0234fd2ebdf2729bb Mon Sep 17 00:00:00 2001 From: Emmanuel Rodriguez Date: Wed, 29 Jul 2009 21:20:12 +0200 Subject: [PATCH] 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 deletion(-) 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); -- 2.39.5