Fix a few warnings/errors in the test-suite using Solaris compiler
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12993 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bee885dfe0
commit
117cb9b74a
5 changed files with 18 additions and 8 deletions
|
|
@ -2,7 +2,7 @@ from autodoc import *
|
||||||
|
|
||||||
def check(got, expected):
|
def check(got, expected):
|
||||||
if expected != got:
|
if expected != got:
|
||||||
raise RuntimeError("\n" + "Expected: [" + expected + "]\n" + "Got : [" + got + "]")
|
raise RuntimeError("\n" + "Expected: [" + str(expected) + "]\n" + "Got : [" + str(got) + "]")
|
||||||
|
|
||||||
check(A.__doc__, "Proxy of C++ A class")
|
check(A.__doc__, "Proxy of C++ A class")
|
||||||
check(A.funk.__doc__, "just a string")
|
check(A.funk.__doc__, "just a string")
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ template<class Key, class T> class Multimap {
|
||||||
class const_iterator {};
|
class const_iterator {};
|
||||||
|
|
||||||
// test usage of a typedef of a nested class in a template
|
// test usage of a typedef of a nested class in a template
|
||||||
Standard::Pair<iterator,iterator> equal_range_1(const key_type& kt1) {}
|
Standard::Pair<iterator,iterator> equal_range_1(const key_type& kt1) { return Standard::Pair<iterator,iterator>(); }
|
||||||
Standard::Pair<const_iterator,const_iterator> equal_range_2(const key_type& kt2) const {}
|
Standard::Pair<const_iterator,const_iterator> equal_range_2(const key_type& kt2) const { return Standard::Pair<const_iterator,const_iterator>(); }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
%typemap(in) Integer1
|
%typemap(in) Integer1
|
||||||
{
|
{
|
||||||
|
$1 = 0;
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -13,6 +14,7 @@
|
||||||
|
|
||||||
%typemap(in) Integer2
|
%typemap(in) Integer2
|
||||||
{
|
{
|
||||||
|
$1 = 0;
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,18 @@ B_t make_b() {
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _Foo {
|
typedef struct _Foo {
|
||||||
enum { NONAME1, NONAME2 } enumvar;
|
enum { NONAME1, NONAME2 } enumvar;
|
||||||
int foovar;
|
int foovar;
|
||||||
void (*fptr)(int);
|
void (*fptr)(int);
|
||||||
} Foo;
|
} Foo;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -65,10 +65,10 @@ void foo2(Foo<short> f, const Foo<short>& ff) {}
|
||||||
%typemap(out) double ABC::_3 "$1 = 0.0;"
|
%typemap(out) double ABC::_3 "$1 = 0.0;"
|
||||||
%inline %{
|
%inline %{
|
||||||
struct ABC {
|
struct ABC {
|
||||||
double meth() {}
|
double meth() { return 0.0; }
|
||||||
double m1() {}
|
double m1() { return 0.0; }
|
||||||
double _x2() {}
|
double _x2() { return 0.0; }
|
||||||
double y_() {}
|
double y_() { return 0.0; }
|
||||||
double _3() {}
|
double _3() { return 0.0; }
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue