diff options
Diffstat (limited to 'xs/t/04_expolygon.t')
-rw-r--r-- | xs/t/04_expolygon.t | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/xs/t/04_expolygon.t b/xs/t/04_expolygon.t new file mode 100644 index 000000000..0fe27640c --- /dev/null +++ b/xs/t/04_expolygon.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Slic3r::XS; +use Test::More tests => 1; + +my $square = [ # ccw + [100, 100], + [200, 100], + [200, 200], + [100, 200], +]; +my $hole_in_square = [ # cw + [140, 140], + [140, 160], + [160, 160], + [160, 140], +]; + +my $expolygon = Slic3r::ExPolygon::XS->new($square, $hole_in_square); +is_deeply [ @$expolygon ], [$square, $hole_in_square], 'expolygon roundtrip'; + +__END__ |