test-suite fixes for compilers that don't support vararg macros
Split TESTCASE_THROW into multiple macros taking different number of arguments. Fixes Visual Studio compiler errors.
This commit is contained in:
parent
1c46662c39
commit
196a965067
19 changed files with 127 additions and 117 deletions
|
|
@ -1,9 +1,9 @@
|
|||
%module catches
|
||||
|
||||
// throw is invalid in C++17 and later, only SWIG to use it
|
||||
#define TESTCASE_THROW(TYPES...) throw(TYPES)
|
||||
#define TESTCASE_THROW3(T1, T2, T3) throw(T1, T2, T3)
|
||||
%{
|
||||
#define TESTCASE_THROW(TYPES...)
|
||||
#define TESTCASE_THROW3(T1, T2, T3)
|
||||
%}
|
||||
|
||||
%include <exception.i> // for throws(...) typemap
|
||||
|
|
@ -23,7 +23,7 @@ void test_catches(int i) {
|
|||
throw ThreeException();
|
||||
}
|
||||
}
|
||||
void test_exception_specification(int i) TESTCASE_THROW(int, const char *, const ThreeException&) {
|
||||
void test_exception_specification(int i) TESTCASE_THROW3(int, const char *, const ThreeException&) {
|
||||
test_catches(i);
|
||||
}
|
||||
void test_catches_all(int i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue