diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2014-11-13 06:59:49 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2014-11-13 06:59:49 +0000 |
commit | 60626c51d97a7ef06b364481ae4afd9706ef6ece (patch) | |
tree | 29f14af72f207da0e57c7ac944a2ab3faddff296 /t/010-isa-false-positive.t | |
download | Class-Load-XS-tarball-master.tar.gz |
Class-Load-XS-0.09HEADClass-Load-XS-0.09master
Diffstat (limited to 't/010-isa-false-positive.t')
-rw-r--r-- | t/010-isa-false-positive.t | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/t/010-isa-false-positive.t b/t/010-isa-false-positive.t new file mode 100644 index 0000000..7136fb6 --- /dev/null +++ b/t/010-isa-false-positive.t @@ -0,0 +1,67 @@ +use strict; +use warnings; +use Test::More 0.88; +use Test::Fatal; + +use lib 't/lib'; +use Test::Class::Load 'load_optional_class'; + +isnt( + exception { + load_optional_class('Class::Load::Error::DieAfterIsa'); + }, + undef, + 'Class which calls die is reported as an error' +); + +{ + local $TODO + = q{I'm not sure this is fixable as it's really an interpreter issue.}; + + isnt( + exception { + load_optional_class('Class::Load::Error::DieAfterIsa'); + }, + undef, + 'Class which calls die is reported as an error (second attempt)' + ); +} + +isnt( + exception { + load_optional_class('Class::Load::Error::DieAfterBeginIsa'); + }, + undef, + 'Class populates @ISA in BEGIN then dies - error on load' +); + +{ + local $TODO + = q{I'm not sure this is fixable as it's really an interpreter issue.}; + + isnt( + exception { + load_optional_class('Class::Load::Error::DieAfterBeginIsa'); + }, + undef, + 'Class populates @ISA in BEGIN then dies - error on load (second attempt)' + ); +} + +isnt( + exception { + load_optional_class('Class::Load::Error::SyntaxErrorAfterIsa'); + }, + undef, + 'Class with a syntax error causes an error' +); + +isnt( + exception { + load_optional_class('Class::Load::Error::SyntaxErrorAfterIsa'); + }, + undef, + 'Class with a syntax error causes an error (second attempt)' +); + +done_testing; |