test-suite fixes (2) for compilers that don't support varargs
Split director_exception testcase into two so that testing throw(), with no arguments, that is nothrows, can be tested separately to throw() taking arguments. [The throw keyword needs to be removed for C++ compilation in C++11 and later when it was deprecated.]
This commit is contained in:
parent
9fb996b83f
commit
50cb18087d
5 changed files with 35 additions and 7 deletions
28
Examples/test-suite/director_exception_nothrow.i
Normal file
28
Examples/test-suite/director_exception_nothrow.i
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
%module(directors="1") director_exception_nothrow
|
||||
|
||||
%include "std_string.i"
|
||||
|
||||
%feature("director") Bar;
|
||||
|
||||
%{
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||
#endif
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
#include <string>
|
||||
|
||||
class Base
|
||||
{
|
||||
public:
|
||||
virtual ~Base() throw() {}
|
||||
};
|
||||
|
||||
|
||||
class Bar : public Base
|
||||
{
|
||||
public:
|
||||
virtual std::string pang() throw() { return "Bar::pang()"; }
|
||||
};
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue