mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 15:21:21 -06:00
Finished porting Config and option definition to XS
This commit is contained in:
parent
9836e963a5
commit
4515d90052
8 changed files with 1301 additions and 1204 deletions
|
@ -4,7 +4,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 70;
|
||||
use Test::More tests => 76;
|
||||
|
||||
foreach my $config (Slic3r::Config->new, Slic3r::Config::Print->new) {
|
||||
$config->set('layer_height', 0.3);
|
||||
|
@ -74,6 +74,12 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Print->new) {
|
|||
$config->set_deserialize('wipe', '0,1,1');
|
||||
is_deeply $config->get('wipe'), [0,1,1], 'deserialize bools';
|
||||
|
||||
$config->set('post_process', ['foo','bar']);
|
||||
is_deeply $config->get('post_process'), ['foo','bar'], 'set/get strings';
|
||||
is $config->serialize('post_process'), 'foo;bar', 'serialize strings';
|
||||
$config->set_deserialize('post_process', 'bar;baz');
|
||||
is_deeply $config->get('post_process'), ['bar','baz'], 'deserialize strings';
|
||||
|
||||
is_deeply [ sort @{$config->get_keys} ], [ sort keys %{$config->as_hash} ], 'get_keys and as_hash';
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue