2013-07-15 10:14:22 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
use Slic3r::XS;
|
2021-05-07 09:42:01 +00:00
|
|
|
use Test::More tests => 3;
|
2013-07-15 10:14:22 +00:00
|
|
|
|
|
|
|
my $square = [ # ccw
|
|
|
|
[100, 100],
|
|
|
|
[200, 100],
|
|
|
|
[200, 200],
|
|
|
|
[100, 200],
|
|
|
|
];
|
|
|
|
|
2013-07-15 20:57:22 +00:00
|
|
|
my $polygon = Slic3r::Polygon->new(@$square);
|
|
|
|
is ref($polygon->arrayref), 'ARRAY', 'polygon arrayref is unblessed';
|
2013-09-02 18:22:20 +00:00
|
|
|
isa_ok $polygon->[0], 'Slic3r::Point::Ref', 'polygon point is blessed';
|
2013-09-03 17:26:58 +00:00
|
|
|
ok ref($polygon->first_point) eq 'Slic3r::Point', 'first_point';
|
2013-09-02 18:22:20 +00:00
|
|
|
|
2013-07-15 10:14:22 +00:00
|
|
|
__END__
|