19_model.t 605 B

12345678910111213141516171819202122
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use Slic3r::XS;
  5. use Test::More tests => 4;
  6. {
  7. my $model = Slic3r::Model->new;
  8. my $object = $model->_add_object;
  9. isa_ok $object, 'Slic3r::Model::Object::Ref';
  10. isa_ok $object->origin_translation, 'Slic3r::Pointf3::Ref';
  11. $object->origin_translation->translate(10,0,0);
  12. is_deeply \@{$object->origin_translation}, [10,0,0], 'origin_translation is modified by ref';
  13. my $lhr = [ [ 5, 10, 0.1 ] ];
  14. $object->set_layer_height_ranges($lhr);
  15. is_deeply $object->layer_height_ranges, $lhr, 'layer_height_ranges roundtrip';
  16. }
  17. __END__