[libchamplain] Test reslecting already selected markers
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [libchamplain] Test reslecting already selected markers
- Date: Tue, 28 Jul 2009 21:40:59 +0000 (UTC)
commit b6eb1bd953feba9fb2c4adf8d8a9185fe24842fa
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date: Sat Jul 11 11:09:13 2009 +0200
Test reslecting already selected markers
.../perl/Champlain/t/ChamplainSelectionLayer.t | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/bindings/perl/Champlain/t/ChamplainSelectionLayer.t b/bindings/perl/Champlain/t/ChamplainSelectionLayer.t
index 1409acf..7972bd0 100644
--- a/bindings/perl/Champlain/t/ChamplainSelectionLayer.t
+++ b/bindings/perl/Champlain/t/ChamplainSelectionLayer.t
@@ -162,25 +162,24 @@ sub test_markers_multiple {
);
- # Select again one of the selected markers, this unselects it
+ # Select again one of the selected markers, should still be selected
$layer->select($marker);
- ok(!$layer->marker_is_selected($marker), "[multiple] select() deselects an already selected marker");
+ ok($layer->marker_is_selected($marker), "[multiple] select() an already selected marker");
$count = $layer->count_selected_markers;
- is($count, 2, "[multiple] count_selected_markers() with a deselected marker");
+ is($count, 3, "[multiple] count_selected_markers() with an already selected marker");
is_deeply(
[ $layer->get_selected_markers ],
- [$layer_markers[1], $layer_markers[3]],
+ [$layer_markers[1], $layer_markers[3], $marker],
"[multiple] get_selected_markers()"
);
-
# Remove a marker
$layer->unselect($layer_markers[1]);
$count = $layer->count_selected_markers;
- is($count, 1, "[multiple] count_selected_markers() after unselect()");
+ is($count, 2, "[multiple] count_selected_markers() after unselect()");
is_deeply(
[ $layer->get_selected_markers ],
- [$layer_markers[3]],
+ [$layer_markers[3], $marker],
"[multiple] get_selected_markers()"
);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]