[libchamplain] Test notify::selection-mode



commit f524556546fc25f826c1358f83c8b541172ef8ae
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date:   Sat Jul 11 09:14:53 2009 +0200

    Test notify::selection-mode

 .../perl/Champlain/t/ChamplainSelectionLayer.t     |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]