From: Emmanuel Rodriguez Date: Wed, 16 Sep 2009 18:40:57 +0000 (+0200) Subject: Libchamplain has now a default selection mode of multiple X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80e89fac482a9d367002329bbe2a68722e8d8565;p=libchamplain Libchamplain has now a default selection mode of multiple --- diff --git a/bindings/perl/Champlain/t/ChamplainSelectionLayer.t b/bindings/perl/Champlain/t/ChamplainSelectionLayer.t index 8ab8540..a2626a4 100644 --- a/bindings/perl/Champlain/t/ChamplainSelectionLayer.t +++ b/bindings/perl/Champlain/t/ChamplainSelectionLayer.t @@ -26,8 +26,8 @@ sub test_empty_multiple { my $layer = Champlain::SelectionLayer->new(); isa_ok($layer, 'Champlain::Layer'); - is($layer->get_selection_mode, 'multiple'); - is($layer->get('selection_mode'), 'multiple'); + is($layer->get_selection_mode, 'single'); + is($layer->get('selection_mode'), 'single'); is($layer->get_selected, undef, "[empty] get_selected()"); @@ -63,11 +63,11 @@ sub test_empty_single { my $layer = Champlain::SelectionLayer->new(); isa_ok($layer, 'Champlain::Layer'); - is($layer->get_selection_mode, 'multiple'); - is($layer->get('selection_mode'), 'multiple'); - $layer->set_selection_mode('single'); is($layer->get_selection_mode, 'single'); is($layer->get('selection_mode'), 'single'); + $layer->set_selection_mode('multiple'); + is($layer->get_selection_mode, 'multiple'); + is($layer->get('selection_mode'), 'multiple'); is($layer->get_selected, undef, "[empty] get_selected()"); @@ -102,6 +102,7 @@ sub test_empty_single { sub test_markers_multiple { my $layer = Champlain::SelectionLayer->new(); isa_ok($layer, 'Champlain::Layer'); + $layer->set_selection_mode('multiple'); my @layer_markers = ( @@ -244,6 +245,10 @@ sub test_selection_mode_change { my $layer = Champlain::SelectionLayer->new(); isa_ok($layer, 'Champlain::Layer'); + # In the past the default selection mode was multiple, so we set it back to + # single just like in the old times + $layer->set_selection_mode('multiple'); + my $notify = 0; $layer->signal_connect('notify::selection-mode', sub { ++$notify;