22_exception.t 450 B

123456789101112131415161718192021
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use Slic3r::XS;
  5. use Test::More tests => 1;
  6. if ($ENV{SLIC3R_HAS_BROKEN_CROAK})
  7. {
  8. ok 1, 'SLIC3R_HAS_BROKEN_CROAK set, croaks and confesses from a C++ code will lead to an application exit!';
  9. }
  10. else
  11. {
  12. eval {
  13. Slic3r::xspp_test_croak_hangs_on_strawberry();
  14. };
  15. is $@, "xspp_test_croak_hangs_on_strawberry: exception catched\n", 'croak from inside a C++ exception delivered';
  16. }
  17. __END__