From 77210e13af585bf1b5dca24419242370fbeb68ca Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 15 Jan 2024 07:33:43 +0000 Subject: [PATCH] Move extra qualifiers testing to different testcase --- Examples/test-suite/class_scope_weird.i | 8 +++++--- Examples/test-suite/friends.i | 24 +++--------------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/Examples/test-suite/class_scope_weird.i b/Examples/test-suite/class_scope_weird.i index cc55dc880..d7409f23e 100644 --- a/Examples/test-suite/class_scope_weird.i +++ b/Examples/test-suite/class_scope_weird.i @@ -3,22 +3,24 @@ // Use this version with extra qualifiers to test SWIG as some compilers accept this class Foo { public: - Foo::Foo(void) {} + Foo::Foo() {} Foo::Foo(int) {} int Foo::bar(int 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) %{ class Foo { public: - Foo(void) {} + Foo() {} Foo(int) {} int bar(int x) { return x; } + void member() { } }; %} @@ -37,7 +39,7 @@ public: 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 { public: diff --git a/Examples/test-suite/friends.i b/Examples/test-suite/friends.i index 1adff315a..82f6eea9c 100644 --- a/Examples/test-suite/friends.i +++ b/Examples/test-suite/friends.i @@ -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 ns2 { class Foo { public: - Foo::Foo() {}; + Foo() {} friend void bar(); 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() {} } } %} - + %template(D_i) D; %template(D_d) D;