From: Emmanuel Rodriguez Date: Sat, 11 Jul 2009 07:14:53 +0000 (+0200) Subject: Test notify::selection-mode X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f524556546fc25f826c1358f83c8b541172ef8ae;p=libchamplain Test notify::selection-mode --- diff --git a/bindings/perl/Champlain/t/ChamplainSelectionLayer.t b/bindings/perl/Champlain/t/ChamplainSelectionLayer.t index d9e966c..7c8ec87 100644 --- a/bindings/perl/Champlain/t/ChamplainSelectionLayer.t +++ b/bindings/perl/Champlain/t/ChamplainSelectionLayer.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Clutter::TestHelper tests => 48; +use Clutter::TestHelper tests => 51; use Champlain; use Data::Dumper; @@ -63,9 +63,15 @@ sub test_empty_single { my $layer = Champlain::SelectionLayer->new(); isa_ok($layer, 'Champlain::Layer'); + my $notify = 0; + $layer->signal_connect('notify::selection-mode', sub { + ++$notify; + }); + is($layer->get_selection_mode, 'multiple'); is($layer->get('selection_mode'), 'multiple'); $layer->set_selection_mode('single'); + is($notify, 1, "signal notify::selection-mode emitted"); is($layer->get_selection_mode, 'single'); is($layer->get('selection_mode'), 'single'); @@ -92,9 +98,11 @@ sub test_empty_single { # Change the selection mode $layer->set_selection_mode('multiple'); + is($notify, 2, "signal notify::selection-mode emitted"); is($layer->get_selection_mode, 'multiple'); $layer->set('selection_mode', 'single'); + is($notify, 3, "signal notify::selection-mode emitted"); is($layer->get('selection_mode'), 'single'); return 0;