mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 22:54:08 -06:00
Fix last_pos shifting and add unit test
This commit is contained in:
parent
ad48fdc7f9
commit
ddaeaa7591
3 changed files with 22 additions and 0 deletions
20
t/gcode.t
Normal file
20
t/gcode.t
Normal file
|
@ -0,0 +1,20 @@
|
|||
use Test::More tests => 1;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
BEGIN {
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin/../lib";
|
||||
}
|
||||
|
||||
use Slic3r;
|
||||
use Slic3r::Geometry qw(scale);
|
||||
|
||||
{
|
||||
local $Slic3r::Config = Slic3r::Config->new_from_defaults;
|
||||
my $gcodegen = Slic3r::GCode->new(layer_count => 1);
|
||||
$gcodegen->set_shift(10, 10);
|
||||
is_deeply $gcodegen->last_pos, [scale -10, scale -10], 'last_pos is shifted correctly';
|
||||
}
|
||||
|
||||
__END__
|
Loading…
Add table
Add a link
Reference in a new issue