Browse Source

Move the definitions to the header again, but provide them at global scope.

This should fix the previous problem too, and keeps related declarations/definitions together.
pull/232/head
triton 11 years ago
parent
commit
69b8b6e6d0
  1. 23
      tests/Basic/Basic.cpp
  2. 22
      tests/Basic/Basic.h

23
tests/Basic/Basic.cpp

@ -231,26 +231,3 @@ Bar::Item operator |(Bar::Item left, Bar::Item right) @@ -231,26 +231,3 @@ Bar::Item operator |(Bar::Item left, Bar::Item right)
{
return left | right;
}
TestDelegates::TestDelegates() : A(Double), B(Double),
C(&TestDelegates::Triple)
{}
TestCopyConstructorRef::TestCopyConstructorRef()
{
}
TestCopyConstructorRef::TestCopyConstructorRef(const TestCopyConstructorRef& other)
{
A = other.A;
B = other.B;
}
TestArraysPointers::TestArraysPointers(MyEnum *values, int count)
{
if (values && count) Value = values[0];
}
int TestGetterSetterToProperties::getWidth() { return 640; }
int TestGetterSetterToProperties::getHeight() { return 480; }

22
tests/Basic/Basic.h

@ -256,6 +256,10 @@ struct DLL_API TestDelegates @@ -256,6 +256,10 @@ struct DLL_API TestDelegates
MemberDelegate C;
};
TestDelegates::TestDelegates() : A(Double), B(Double), C(&TestDelegates::Triple)
{
}
// Tests delegate generation for attributed function types
typedef int(__cdecl *AttributedDelegate)(int n);
DLL_API int __cdecl Double(int n) { return n * 2; }
@ -310,6 +314,16 @@ public: @@ -310,6 +314,16 @@ public:
float B;
};
TestCopyConstructorRef::TestCopyConstructorRef()
{
}
TestCopyConstructorRef::TestCopyConstructorRef(const TestCopyConstructorRef& other)
{
A = other.A;
B = other.B;
}
template <class T>
struct EmptyNamedNestedEnum
{
@ -375,8 +389,16 @@ public: @@ -375,8 +389,16 @@ public:
MyEnum Value;
};
TestArraysPointers::TestArraysPointers(MyEnum *values, int count)
{
if (values && count) Value = values[0];
}
struct DLL_API TestGetterSetterToProperties
{
int getWidth();
int getHeight();
};
int TestGetterSetterToProperties::getWidth() { return 640; }
int TestGetterSetterToProperties::getHeight() { return 480; }

Loading…
Cancel
Save