From ed51c802b9bac4e17825733452c727599e11ca6d Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Sat, 28 Nov 2020 21:52:01 +0200 Subject: [PATCH] Fix importing/exporting redeclaration in symbols Signed-off-by: Dimitar Dobrev --- tests/CSharp/CSharp.cpp | 40 +++++++++++++++++++++++++++++++++++++++ tests/CSharp/CSharp.h | 42 ----------------------------------------- 2 files changed, 40 insertions(+), 42 deletions(-) diff --git a/tests/CSharp/CSharp.cpp b/tests/CSharp/CSharp.cpp index b160b3db..3d8dc1f0 100644 --- a/tests/CSharp/CSharp.cpp +++ b/tests/CSharp/CSharp.cpp @@ -310,6 +310,8 @@ ForceCreationOfInterface::~ForceCreationOfInterface() { } +Baz::Baz() : P(5) {} + Baz::Baz(Bar::Items item) { } @@ -369,6 +371,8 @@ AbstractProprietor::AbstractProprietor(int i) { } +Proprietor::Proprietor() : _items(Bar::Items::Item1), _itemsByValue(Bar::Items::Item1) {} + Proprietor::Proprietor(int i) : AbstractProprietor(i) { } @@ -501,6 +505,9 @@ void TestDestructors::InitMarker() Marker = 0; } +TestDestructors::TestDestructors() { Marker = 0xf00d; } +TestDestructors::~TestDestructors() { Marker = 0xcafe; } + int TestDestructors::Marker = 0; TestCopyConstructorVal::TestCopyConstructorVal() @@ -905,6 +912,20 @@ void PropertyWithIgnoredType::setIgnoredType(const IgnoredType& value) _ignoredType = value; } +MI_A0::MI_A0() : F(50) {} +int MI_A0::get() { return F; }; + +MI_A::MI_A() {} +void MI_A::v(int i) {} + +MI_B::MI_B() {} + +MI_C::MI_C() {} + +MI_A1::MI_A1() {} + +MI_D::MI_D() {} + StructWithPrivateFields::StructWithPrivateFields(int simplePrivateField, Foo complexPrivateField) { this->simplePrivateField = simplePrivateField; @@ -921,6 +942,14 @@ Foo StructWithPrivateFields::getComplexPrivateField() return complexPrivateField; } +void TestPointers::TestDoubleCharPointers(const char** names) +{ +} + +void TestPointers::TestTripleCharPointers(const char*** names) +{ +} + HasVirtualDtor1::HasVirtualDtor1() { testField = 5; @@ -1613,6 +1642,17 @@ TestIndexedProperties::TestIndexedProperties() : field(0) { } +int TestIndexedProperties::operator[](const int& key) +{ + return key; +} + +void* TestIndexedProperties::operator[](size_t n) const +{ + field = n; + return &field; +} + void useStdStringJustAsParameter(std::string s) { } diff --git a/tests/CSharp/CSharp.h b/tests/CSharp/CSharp.h index 7ed21ced..42ec38e7 100644 --- a/tests/CSharp/CSharp.h +++ b/tests/CSharp/CSharp.h @@ -178,8 +178,6 @@ public: FunctionTypedef functionTypedef; }; -Baz::Baz() : P(5) {} - struct QArrayData { }; @@ -234,8 +232,6 @@ private: Bar::Items _itemsByValue; }; -Proprietor::Proprietor() : _items(Bar::Items::Item1), _itemsByValue(Bar::Items::Item1) {} - class DLL_API ComplexType { public: @@ -285,9 +281,6 @@ struct DLL_API TestDestructors ~TestDestructors(); }; -TestDestructors::TestDestructors() { Marker = 0xf00d; } -TestDestructors::~TestDestructors() { Marker = 0xcafe; } - class DLL_API TestCopyConstructorVal { public: @@ -582,46 +575,32 @@ struct DLL_API MI_A0 int F; }; -MI_A0::MI_A0() : F(50) {} -int MI_A0::get() { return F; }; - struct DLL_API MI_A { MI_A(); virtual void v(int i = 5); }; -MI_A::MI_A() {} -void MI_A::v(int i) {} - struct DLL_API MI_B : public MI_A { MI_B(); }; -MI_B::MI_B() {} - struct DLL_API MI_C : public MI_A0, public MI_B { MI_C(); }; -MI_C::MI_C() {} - struct DLL_API MI_A1 { MI_A1(); }; -MI_A1::MI_A1() {} - struct DLL_API MI_D : public MI_A1, public MI_C { MI_D(); }; -MI_D::MI_D() {} - class DLL_API StructWithPrivateFields { public: @@ -686,16 +665,6 @@ struct DLL_API TestPointers const char** Names; }; -void TestPointers::TestDoubleCharPointers(const char** names) -{ - -} - -void TestPointers::TestTripleCharPointers(const char*** names) -{ - -} - class DLL_API HasVirtualDtor1 { public: @@ -1344,17 +1313,6 @@ public: void* operator[](size_t n) const; }; -int TestIndexedProperties::operator[](const int& key) -{ - return key; -} - -void* TestIndexedProperties::operator[](size_t n) const -{ - field = n; - return &field; -} - extern const ComplexArrayElement ArrayOfVariableSize[]; void useStdStringJustAsParameter(std::string s);