[libchamplain] Testing hide(), show() and the properties closed-path and visible
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [libchamplain] Testing hide(), show() and the properties closed-path and visible
- Date: Sun, 14 Jun 2009 13:21:59 -0400 (EDT)
commit be984bce3a34f50ac08a9608a3c83a019c2b95b1
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date: Sun Jun 14 19:16:20 2009 +0200
Testing hide(), show() and the properties closed-path and visible
bindings/perl/Champlain/t/ChamplainPolygon.t | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/bindings/perl/Champlain/t/ChamplainPolygon.t b/bindings/perl/Champlain/t/ChamplainPolygon.t
index 3109c0a..d9beb6b 100644
--- a/bindings/perl/Champlain/t/ChamplainPolygon.t
+++ b/bindings/perl/Champlain/t/ChamplainPolygon.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Clutter::TestHelper tests => 42;
+use Clutter::TestHelper tests => 48;
use Champlain;
@@ -33,13 +33,13 @@ sub test_empty {
is_color($polygon->get_fill_color, $DEFAULT_FILL_COLOR, "fill_color is set on a new polygon");
is_color($polygon->get_stroke_color, $DEFAULT_STROKE_NAME, "stroke_color is set on a new polygon");
- ok(!$polygon->get_fill, "fill is set on a new polygon");
+ ok(!$polygon->get_fill, "fill is unset on a new polygon");
ok($polygon->get_stroke, "stroke is set on a new polygon");
is($polygon->get_stroke_width, 2, "stroke_width is set on a new polygon");
- # Call these methods hopping that they won't crash.
- $polygon->show();
- $polygon->hide();
+ # These fields have no accessor yet
+ ok(!$polygon->get('closed-path'), "closed-path is unset on a new polygon");
+ ok($polygon->get('visible'), "closed-path is set on a new polygon");
}
@@ -75,6 +75,12 @@ sub test_setters {
$polygon->set_stroke_width($old_stroke_width + 2);
is($polygon->get_stroke_width, $old_stroke_width + 2, "set_stroke_width()");
}
+
+
+ $polygon->hide();
+ ok(!$polygon->get('visible'), "hide()");
+ $polygon->show();
+ ok($polygon->get('visible'), "show()");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]