mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-10 15:25:18 -06:00
Bless arrayref representation into Slic3r classes
This commit is contained in:
parent
53e4532f9c
commit
989e48ede0
5 changed files with 11 additions and 5 deletions
|
@ -4,7 +4,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 1;
|
||||
use Test::More tests => 4;
|
||||
|
||||
my $square = [ # ccw
|
||||
[100, 100],
|
||||
|
@ -22,4 +22,8 @@ my $hole_in_square = [ # cw
|
|||
my $expolygon = Slic3r::ExPolygon::XS->new($square, $hole_in_square);
|
||||
is_deeply [ @$expolygon ], [$square, $hole_in_square], 'expolygon roundtrip';
|
||||
|
||||
isa_ok $expolygon->arrayref, 'Slic3r::ExPolygon', 'Perl expolygon is blessed';
|
||||
isa_ok $expolygon->[0], 'Slic3r::Polygon', 'Perl polygons are blessed';
|
||||
isa_ok $expolygon->[0][0], 'Slic3r::Point', 'Perl polygon points are blessed';
|
||||
|
||||
__END__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue