Browse Source

Add unit test for polyline_lines

Alessandro Ranellucci 12 years ago
parent
commit
3794d51cc7
1 changed files with 11 additions and 1 deletions
  1. 11 1
      t/geometry.t

+ 11 - 1
t/geometry.t

@@ -2,7 +2,7 @@ use Test::More;
 use strict;
 use warnings;
 
-plan tests => 20;
+plan tests => 21;
 
 BEGIN {
     use FindBin;
@@ -154,4 +154,14 @@ is Slic3r::Geometry::can_connect_points(@$points, $polygons), 0, 'can_connect_po
     is polygon_is_convex($convex1), 0, 'concave polygon';
 }
 
+#==========================================================
+
+{
+    my $polyline = Slic3r::Polyline->new([0, 0], [10, 0], [20, 0]);
+    is_deeply [$polyline->lines], [
+        [ [0, 0], [10, 0] ],
+        [ [10, 0], [20, 0] ],
+    ], 'polyline_lines';
+}
+
 #==========================================================