mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 20:36:00 +08:00
Add a serialize/unserialize roundtrip in test. #3921
This commit is contained in:
parent
6382af2b65
commit
8e26332867
@ -107,6 +107,7 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Static::new_FullPrintCo
|
|||||||
is_deeply [ map $_->pp, @{$config->get('extruder_offset')} ], [[10,20],[30,45]], 'set/get points';
|
is_deeply [ map $_->pp, @{$config->get('extruder_offset')} ], [[10,20],[30,45]], 'set/get points';
|
||||||
$config->set('extruder_offset', [Slic3r::Pointf->new(10,20),Slic3r::Pointf->new(30,45)]);
|
$config->set('extruder_offset', [Slic3r::Pointf->new(10,20),Slic3r::Pointf->new(30,45)]);
|
||||||
is_deeply [ map $_->pp, @{$config->get('extruder_offset')} ], [[10,20],[30,45]], 'set/get points';
|
is_deeply [ map $_->pp, @{$config->get('extruder_offset')} ], [[10,20],[30,45]], 'set/get points';
|
||||||
|
$config->set_deserialize('extruder_offset', $config->serialize('extruder_offset'));
|
||||||
is $config->serialize('extruder_offset'), '10x20,30x45', 'serialize points';
|
is $config->serialize('extruder_offset'), '10x20,30x45', 'serialize points';
|
||||||
$config->set_deserialize('extruder_offset', '20x10');
|
$config->set_deserialize('extruder_offset', '20x10');
|
||||||
is_deeply [ map $_->pp, @{$config->get('extruder_offset')} ], [[20,10]], 'deserialize points';
|
is_deeply [ map $_->pp, @{$config->get('extruder_offset')} ], [[20,10]], 'deserialize points';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user