2013-07-03 13:42:01 +00:00
|
|
|
use Test::More tests => 1;
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
BEGIN {
|
|
|
|
use FindBin;
|
|
|
|
use lib "$FindBin::Bin/../lib";
|
|
|
|
}
|
|
|
|
|
|
|
|
use Slic3r;
|
|
|
|
use Slic3r::Test;
|
|
|
|
use Storable qw(nstore retrieve);
|
|
|
|
use Time::HiRes qw(gettimeofday tv_interval);
|
|
|
|
|
|
|
|
{
|
|
|
|
my $t0 = [gettimeofday];
|
|
|
|
my $print = Slic3r::Test::init_print('20mm_cube', scale => 2);
|
|
|
|
my $gcode = Slic3r::Test::gcode($print);
|
2013-07-07 13:18:32 +00:00
|
|
|
###diag sprintf 'Slicing took %s seconds', tv_interval($t0);
|
2013-07-03 13:42:01 +00:00
|
|
|
|
|
|
|
my $t1 = [gettimeofday];
|
|
|
|
nstore $print, 'print.dat';
|
|
|
|
$print = retrieve 'print.dat';
|
2013-07-07 13:18:32 +00:00
|
|
|
unlink 'print.dat';
|
|
|
|
###diag sprintf 'Freezing and retrieving took %s seconds', tv_interval($t1);
|
2013-07-03 13:42:01 +00:00
|
|
|
|
|
|
|
isa_ok $print, 'Slic3r::Print', 'restored Print object';
|
|
|
|
}
|
|
|
|
|
|
|
|
__END__
|