More comprehensive exception specification tests added.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5942 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-05-29 15:09:25 +00:00
commit 9f2060e608

View file

@ -7,16 +7,40 @@
class Error {
};
namespace Namespace {
typedef Error ErrorTypedef;
typedef const Error& ErrorRef;
typedef const Error* ErrorPtr;
};
class Foo {
public:
void test_int() throw(int) {
throw 37;
throw 37;
}
void test_msg() throw(const char *) {
throw "Dead";
throw "Dead";
}
void test_cls() throw(Error) {
throw Error();
throw Error();
}
void test_cls_ptr() throw(Error *) {
static Error StaticError;
throw &StaticError;
}
void test_cls_ref() throw(Error &) {
static Error StaticError;
throw StaticError;
}
void test_cls_td() throw(Namespace::ErrorTypedef) {
throw Error();
}
void test_cls_ptr_td() throw(Namespace::ErrorPtr) {
static Error StaticError;
throw &StaticError;
}
void test_cls_ref_td() throw(Namespace::ErrorRef) {
static Error StaticError;
throw StaticError;
}
void test_multi(int x) throw(int, const char *, Error) {
if (x == 1) throw 37;