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:
William S Fulton 2012-04-15 21:56:38 +00:00
commit 117cb9b74a
5 changed files with 18 additions and 8 deletions

View file

@ -2,7 +2,7 @@ from autodoc import *
def check(got, expected):
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.funk.__doc__, "just a string")

View file

@ -24,8 +24,8 @@ template<class Key, class T> class Multimap {
class const_iterator {};
// 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<const_iterator,const_iterator> equal_range_2(const key_type& kt2) const {}
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 { return Standard::Pair<const_iterator,const_iterator>(); }
};
}
%}

View file

@ -3,6 +3,7 @@
%typemap(in) Integer1
{
$1 = 0;
/* do nothing */
}
@ -13,6 +14,7 @@
%typemap(in) Integer2
{
$1 = 0;
/* do nothing */
}

View file

@ -45,10 +45,18 @@ B_t make_b() {
%inline %{
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _Foo {
enum { NONAME1, NONAME2 } enumvar;
int foovar;
void (*fptr)(int);
} Foo;
#ifdef __cplusplus
}
#endif
%}

View file

@ -65,10 +65,10 @@ void foo2(Foo<short> f, const Foo<short>& ff) {}
%typemap(out) double ABC::_3 "$1 = 0.0;"
%inline %{
struct ABC {
double meth() {}
double m1() {}
double _x2() {}
double y_() {}
double _3() {}
double meth() { return 0.0; }
double m1() { return 0.0; }
double _x2() { return 0.0; }
double y_() { return 0.0; }
double _3() { return 0.0; }
};
%}