Initialize no_sort to prevent it from being unexpectedly true

This commit is contained in:
Alessandro Ranellucci 2013-08-25 20:29:45 +02:00
parent fc9cec9d81
commit ee5b999ab0
2 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,7 @@ class ExtrusionEntityCollection : public ExtrusionEntity
public:
ExtrusionEntitiesPtr entities;
bool no_sort;
ExtrusionEntityCollection(): no_sort(false) {};
};
}

View File

@ -4,7 +4,7 @@ use strict;
use warnings;
use Slic3r::XS;
use Test::More tests => 8;
use Test::More tests => 9;
my $points = [
[100, 100],
@ -24,6 +24,7 @@ my $loop = Slic3r::ExtrusionLoop->new(
my $collection = Slic3r::ExtrusionPath::Collection->new($path);
isa_ok $collection, 'Slic3r::ExtrusionPath::Collection', 'collection object with items in constructor';
ok !$collection->no_sort, 'no_sort is false by default';
$collection->append($collection);
is scalar(@$collection), 2, 'append ExtrusionPath::Collection';