Browse Source

Removed all remaining inlined bodies in order to fix the tests on Linux.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/520/head
Dimitar Dobrev 10 years ago
parent
commit
fa58aea3f0
  1. 48
      tests/Basic/Basic.cpp
  2. 22
      tests/Basic/Basic.h

48
tests/Basic/Basic.cpp

@ -267,6 +267,26 @@ Bar indirectReturn()
return Bar(); 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) int ImplementsAbstractFoo::pureFunction(int i)
{ {
return 5; return 5;
@ -346,6 +366,26 @@ int (*TestDelegates::MarshalAnonymousDelegate4())(int n)
return f; 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 (*)()) void DelegateNamespace::Nested::f1(void (*)())
{ {
} }
@ -388,12 +428,12 @@ int HasFriend::getM()
return m; 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); 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); return HasFriend(f1.m - f2.m);
} }
@ -417,6 +457,10 @@ void HasVirtualProperty::setProperty(int value)
{ {
} }
ChangedAccessOfInheritedProperty::ChangedAccessOfInheritedProperty()
{
}
int ChangedAccessOfInheritedProperty::getProperty() int ChangedAccessOfInheritedProperty::getProperty()
{ {
return 2; return 2;

22
tests/Basic/Basic.h

@ -307,11 +307,11 @@ struct DLL_API TestDelegates
typedef int(TestDelegates::*MemberDelegate)(int); typedef int(TestDelegates::*MemberDelegate)(int);
TestDelegates(); TestDelegates();
static int Double(int N) { return N * 2; } static int Double(int N);
int Triple(int N) { return N * 3; } int Triple(int N);
int StdCall(DelegateStdCall del) { return del(1); } int StdCall(DelegateStdCall del);
int CDecl(DelegateCDecl del) { return del(1); } int CDecl(DelegateCDecl del);
void MarshalUnattributedDelegate(DelegateInGlobalNamespace del); void MarshalUnattributedDelegate(DelegateInGlobalNamespace del);
int MarshalAnonymousDelegate(int (*del)(int n)); int MarshalAnonymousDelegate(int (*del)(int n));
@ -595,14 +595,14 @@ int TestGetterSetterToProperties::getHeight() { return 480; }
class DLL_API ClassA class DLL_API ClassA
{ {
public: public:
ClassA(int value) { Value = value; } ClassA(int value);
int Value; int Value;
}; };
class DLL_API ClassB class DLL_API ClassB
{ {
public: public:
// conversion from ClassA (constructor): // conversion from ClassA (constructor):
ClassB(const ClassA& x) { Value = x.Value; } ClassB(const ClassA& x);
int Value; int Value;
// conversion from ClassA (assignment): // conversion from ClassA (assignment):
//ClassB& operator= (const ClassA& x) { return *this; } //ClassB& operator= (const ClassA& x) { return *this; }
@ -613,9 +613,9 @@ class DLL_API ClassC
{ {
public: public:
// This should NOT lead to a conversion // 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 // This should lead to an explicit conversion
explicit ClassC(const ClassB& x) { Value = x.Value; } explicit ClassC(const ClassB& x);
int Value; int Value;
}; };
@ -714,8 +714,8 @@ class DLL_API HasFriend
{ {
public: public:
HasFriend(int m); HasFriend(int m);
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 inline const HasFriend operator-(const HasFriend& f1, const HasFriend& f2); DLL_API friend const HasFriend operator-(const HasFriend& f1, const HasFriend& f2);
int getM(); int getM();
private: private:
int m; int m;
@ -783,6 +783,8 @@ public:
class DLL_API ChangedAccessOfInheritedProperty : public HasVirtualProperty class DLL_API ChangedAccessOfInheritedProperty : public HasVirtualProperty
{ {
public:
ChangedAccessOfInheritedProperty();
protected: protected:
int getProperty(); int getProperty();
void setProperty(int value); void setProperty(int value);

Loading…
Cancel
Save