Test modifications of changed behaviour in perl 5.12 and 5.14 in reporting errors

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12690 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-05-19 18:48:57 +00:00
commit 527c3e0552
2 changed files with 8 additions and 8 deletions

View file

@ -41,11 +41,11 @@ ok(not($@), '%rename handling');
# exception specifications
eval { default_args::exceptionspec() };
is($@, "ciao", "exceptionspec 1");
like($@, qr/^ciao/, "exceptionspec 1");
eval { default_args::exceptionspec(-1) };
is($@, "ciao", "exceptionspec 2");
like($@, qr/^ciao/, "exceptionspec 2");
eval { default_args::exceptionspec(100) };
is($@, '100', "exceptionspec 3");
like($@, qr/^100/, "exceptionspec 3");
my $ex = new default_args::Except($false);
@ -54,13 +54,13 @@ eval { $ex->exspec(); $hit = 1; };
# a zero was thrown, an exception occured, but $@ is false
is($hit, 0, "exspec 1");
eval { $ex->exspec(-1) };
is($@, "ciao", "exspec 2");
like($@, qr/^ciao/, "exspec 2");
eval { $ex->exspec(100) };
is($@, 100, "exspec 3");
like($@, qr/^100/, "exspec 3");
eval { $ex = default_args::Except->new($true) };
is($@, -1, "Except constructor 1");
like($@, qr/-1/, "Except constructor 1");
eval { $ex = default_args::Except->new($true, -2) };
is($@, -2, "Except constructor 2");
like($@, qr/-2/, "Except constructor 2");
#Default parameters in static class methods
is(default_args::Statics::staticmethod(), 60, "staticmethod 1");