Ported more Slic3r::GCode methods to XS

This commit is contained in:
Alessandro Ranellucci 2015-07-01 23:00:52 +02:00
parent 801f629fdc
commit b4019bb438
9 changed files with 237 additions and 165 deletions

17
xs/t/21_gcode.t Normal file
View file

@ -0,0 +1,17 @@
#!/usr/bin/perl
use strict;
use warnings;
use Slic3r::XS;
use Test::More tests => 2;
{
my $gcodegen = Slic3r::GCode->new;
$gcodegen->set_origin(Slic3r::Pointf->new(10,0));
is_deeply $gcodegen->origin->pp, [10,0], 'set_origin';
$gcodegen->origin->translate(5,5);
is_deeply $gcodegen->origin->pp, [15,5], 'origin returns reference to point';
}
__END__