]> err.no Git - libchamplain/commitdiff
Remove a TODO and test that clear can be called twice
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Wed, 29 Jul 2009 20:28:24 +0000 (22:28 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Fri, 31 Jul 2009 21:12:09 +0000 (17:12 -0400)
bindings/perl/Champlain/t/ChamplainPolygon.t

index 4686eee13187bccc5388a50e251f34d66296a7e4..28b62161a532985f4dd51688420c1e353b043cbd 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Clutter::TestHelper tests => 49;
+use Clutter::TestHelper tests => 50;
 
 use Champlain;
 
@@ -30,6 +30,9 @@ sub test_empty {
        $polygon->clear_points();
        is_deeply(\@points, [], "No points on a cleared polygon");
        
+       $polygon->clear_points();
+       is_deeply(\@points, [], "No points on a cleared polygon (2 times)");
+
        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");
        
@@ -190,14 +193,11 @@ sub test_points {
 
 
        # Clear the polygon (it should be empty after)
-       TODO: {
-               local $TODO = "Bug in libchamplain";
-               $polygon->clear_points();
-               is_polygon($polygon, [], "clear_points()");
+       $polygon->clear_points();
+       is_polygon($polygon, [], "clear_points()");
 
-               $polygon->append_point(100, 200);
-               is_polygon($polygon, [100, 200], "add_point on a cleared polygon");
-       }
+       $polygon->append_point(100, 200);
+       is_polygon($polygon, [100, 200], "add_point on a cleared polygon");
 }