Move extra qualifiers testing to different testcase

This commit is contained in:
William S Fulton 2024-01-15 07:33:43 +00:00
parent 158fbdc760
commit 77210e13af
2 changed files with 8 additions and 24 deletions

View File

@ -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:

View File

@ -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>;