From fa58aea3f0f0a4cfd7600013e9a939d1ff271028 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Tue, 14 Jul 2015 22:42:17 +0100 Subject: [PATCH] Removed all remaining inlined bodies in order to fix the tests on Linux. Signed-off-by: Dimitar Dobrev --- tests/Basic/Basic.cpp | 48 +++++++++++++++++++++++++++++++++++++++++-- tests/Basic/Basic.h | 22 +++++++++++--------- 2 files changed, 58 insertions(+), 12 deletions(-) diff --git a/tests/Basic/Basic.cpp b/tests/Basic/Basic.cpp index a4c4e4ba..586c72fd 100644 --- a/tests/Basic/Basic.cpp +++ b/tests/Basic/Basic.cpp @@ -267,6 +267,26 @@ Bar indirectReturn() return Bar(); } +int TestDelegates::Double(int N) +{ + return N * 2; +} + +int TestDelegates::Triple(int N) +{ + return N * 3; +} + +int TestDelegates::StdCall(DelegateStdCall del) +{ + return del(1); +} + +int TestDelegates::CDecl(DelegateCDecl del) +{ + return del(1); +} + int ImplementsAbstractFoo::pureFunction(int i) { return 5; @@ -346,6 +366,26 @@ int (*TestDelegates::MarshalAnonymousDelegate4())(int n) return f; } +ClassA::ClassA(int value) +{ + Value = value; +} + +ClassB::ClassB(const ClassA &x) +{ + Value = x.Value; +} + +ClassC::ClassC(const ClassA *x) +{ + Value = x->Value; +} + +ClassC::ClassC(const ClassB &x) +{ + Value = x.Value; +} + void DelegateNamespace::Nested::f1(void (*)()) { } @@ -388,12 +428,12 @@ int HasFriend::getM() return m; } -DLL_API inline const HasFriend operator+(const HasFriend& f1, const HasFriend& f2) +DLL_API const HasFriend operator+(const HasFriend& f1, const HasFriend& f2) { return HasFriend(f1.m + f2.m); } -DLL_API inline const HasFriend operator-(const HasFriend& f1, const HasFriend& f2) +DLL_API const HasFriend operator-(const HasFriend& f1, const HasFriend& f2) { return HasFriend(f1.m - f2.m); } @@ -417,6 +457,10 @@ void HasVirtualProperty::setProperty(int value) { } +ChangedAccessOfInheritedProperty::ChangedAccessOfInheritedProperty() +{ +} + int ChangedAccessOfInheritedProperty::getProperty() { return 2; diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h index 21412d86..c9e8b9b8 100644 --- a/tests/Basic/Basic.h +++ b/tests/Basic/Basic.h @@ -307,11 +307,11 @@ struct DLL_API TestDelegates typedef int(TestDelegates::*MemberDelegate)(int); TestDelegates(); - static int Double(int N) { return N * 2; } - int Triple(int N) { return N * 3; } + static int Double(int N); + int Triple(int N); - int StdCall(DelegateStdCall del) { return del(1); } - int CDecl(DelegateCDecl del) { return del(1); } + int StdCall(DelegateStdCall del); + int CDecl(DelegateCDecl del); void MarshalUnattributedDelegate(DelegateInGlobalNamespace del); int MarshalAnonymousDelegate(int (*del)(int n)); @@ -595,14 +595,14 @@ int TestGetterSetterToProperties::getHeight() { return 480; } class DLL_API ClassA { public: - ClassA(int value) { Value = value; } + ClassA(int value); int Value; }; class DLL_API ClassB { public: // conversion from ClassA (constructor): - ClassB(const ClassA& x) { Value = x.Value; } + ClassB(const ClassA& x); int Value; // conversion from ClassA (assignment): //ClassB& operator= (const ClassA& x) { return *this; } @@ -613,9 +613,9 @@ class DLL_API ClassC { public: // This should NOT lead to a conversion - ClassC(const ClassA* x) { Value = x->Value; } + ClassC(const ClassA* x); // This should lead to an explicit conversion - explicit ClassC(const ClassB& x) { Value = x.Value; } + explicit ClassC(const ClassB& x); int Value; }; @@ -714,8 +714,8 @@ class DLL_API HasFriend { public: HasFriend(int m); - DLL_API friend inline const HasFriend operator+(const HasFriend& f1, const HasFriend& f2); - DLL_API friend inline const HasFriend operator-(const HasFriend& f1, const HasFriend& f2); + DLL_API friend const HasFriend operator+(const HasFriend& f1, const HasFriend& f2); + DLL_API friend const HasFriend operator-(const HasFriend& f1, const HasFriend& f2); int getM(); private: int m; @@ -783,6 +783,8 @@ public: class DLL_API ChangedAccessOfInheritedProperty : public HasVirtualProperty { +public: + ChangedAccessOfInheritedProperty(); protected: int getProperty(); void setProperty(int value);