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() @@ -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) @@ -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() @@ -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) @@ -417,6 +457,10 @@ void HasVirtualProperty::setProperty(int value)
{
}
ChangedAccessOfInheritedProperty::ChangedAccessOfInheritedProperty()
{
}
int ChangedAccessOfInheritedProperty::getProperty()
{
return 2;

22
tests/Basic/Basic.h

@ -307,11 +307,11 @@ struct DLL_API TestDelegates @@ -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; } @@ -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 @@ -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 @@ -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: @@ -783,6 +783,8 @@ public:
class DLL_API ChangedAccessOfInheritedProperty : public HasVirtualProperty
{
public:
ChangedAccessOfInheritedProperty();
protected:
int getProperty();
void setProperty(int value);

Loading…
Cancel
Save