mirror of https://github.com/swig/swig
Move extra qualifiers testing to different testcase
This commit is contained in:
parent
158fbdc760
commit
77210e13af
|
@ -3,22 +3,24 @@
|
||||||
// Use this version with extra qualifiers to test SWIG as some compilers accept this
|
// Use this version with extra qualifiers to test SWIG as some compilers accept this
|
||||||
class Foo {
|
class Foo {
|
||||||
public:
|
public:
|
||||||
Foo::Foo(void) {}
|
Foo::Foo() {}
|
||||||
Foo::Foo(int) {}
|
Foo::Foo(int) {}
|
||||||
int Foo::bar(int x) {
|
int Foo::bar(int x) {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
void Foo::member() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Remove extra qualifiers for the compiler as some compilers won't compile the extra qaulification (eg gcc-4.1 onwards)
|
// Remove extra qualifiers for the compiler as some compilers won't compile the extra qaulification (eg gcc-4.1 onwards)
|
||||||
%{
|
%{
|
||||||
class Foo {
|
class Foo {
|
||||||
public:
|
public:
|
||||||
Foo(void) {}
|
Foo() {}
|
||||||
Foo(int) {}
|
Foo(int) {}
|
||||||
int bar(int x) {
|
int bar(int x) {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
void member() { }
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@ -37,7 +39,7 @@ public:
|
||||||
Quat::Quat(const matrix4& m){}
|
Quat::Quat(const matrix4& m){}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Remove extra qualifiers for the compiler as some compilers won't compile the extra qaulification (eg gcc-4.1 onwards)
|
// Remove extra qualifiers for the compiler as some compilers won't compile the extra qualification (eg gcc-4.1 onwards)
|
||||||
%{
|
%{
|
||||||
class Quat {
|
class Quat {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -208,38 +208,20 @@ void Mate::private_function() { this->val = 4321; }
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
||||||
// Use this version with extra qualifiers to test SWIG as some compilers accept this
|
%inline %{
|
||||||
namespace ns1 {
|
namespace ns1 {
|
||||||
namespace ns2 {
|
namespace ns2 {
|
||||||
class Foo {
|
class Foo {
|
||||||
public:
|
public:
|
||||||
Foo::Foo() {};
|
Foo() {}
|
||||||
friend void bar();
|
friend void bar();
|
||||||
friend void ns1::baz();
|
friend void ns1::baz();
|
||||||
void Foo::member() { }
|
|
||||||
|
|
||||||
};
|
|
||||||
void bar() {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove extra qualifiers for the compiler as some compilers won't compile the extra qualification (eg gcc-4.1 onwards)
|
|
||||||
%{
|
|
||||||
namespace ns1 {
|
|
||||||
namespace ns2 {
|
|
||||||
class Foo {
|
|
||||||
public:
|
|
||||||
Foo() {};
|
|
||||||
friend void bar();
|
|
||||||
friend void ns1::baz();
|
|
||||||
void member() { }
|
|
||||||
|
|
||||||
};
|
};
|
||||||
void bar() {}
|
void bar() {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
||||||
%template(D_i) D<int>;
|
%template(D_i) D<int>;
|
||||||
%template(D_d) D<double>;
|
%template(D_d) D<double>;
|
||||||
|
|
Loading…
Reference in New Issue