Browse Source

Moved some tests definitions from the header to the source file.

pull/232/head
triton 11 years ago
parent
commit
a33277f233
  1. 17
      tests/Basic/Basic.cpp
  2. 14
      tests/Basic/Basic.h

17
tests/Basic/Basic.cpp

@ -14,6 +14,8 @@ const char* Foo::GetANSI() @@ -14,6 +14,8 @@ const char* Foo::GetANSI()
return "ANSI";
}
Foo2::Foo2() {}
Foo2 Foo2::operator<<(signed int i)
{
Foo2 foo;
@ -197,6 +199,8 @@ int ImplementsAbstractFoo::pureFunction2() @@ -197,6 +199,8 @@ int ImplementsAbstractFoo::pureFunction2()
return 15;
}
ReturnsAbstractFoo::ReturnsAbstractFoo() {}
const AbstractFoo& ReturnsAbstractFoo::getFoo()
{
return i;
@ -228,6 +232,11 @@ Bar::Item operator |(Bar::Item left, Bar::Item right) @@ -228,6 +232,11 @@ Bar::Item operator |(Bar::Item left, Bar::Item right)
return left | right;
}
TestDelegates::TestDelegates() : A(Double), B(Double),
C(&TestDelegates::Triple)
{}
TestCopyConstructorRef::TestCopyConstructorRef()
{
}
@ -237,3 +246,11 @@ TestCopyConstructorRef::TestCopyConstructorRef(const TestCopyConstructorRef& oth @@ -237,3 +246,11 @@ TestCopyConstructorRef::TestCopyConstructorRef(const TestCopyConstructorRef& oth
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; }

14
tests/Basic/Basic.h

@ -43,6 +43,8 @@ class DLL_API Foo2 : public Foo @@ -43,6 +43,8 @@ class DLL_API Foo2 : public Foo
public:
Foo2();
int C;
Foo2 operator<<(signed int i);
@ -142,6 +144,7 @@ public: @@ -142,6 +144,7 @@ public:
class DLL_API ReturnsAbstractFoo
{
public:
ReturnsAbstractFoo();
const AbstractFoo& getFoo();
private:
@ -243,7 +246,7 @@ struct DLL_API TestDelegates @@ -243,7 +246,7 @@ struct DLL_API TestDelegates
typedef int (*DelegateInClass)(int);
typedef int(TestDelegates::*MemberDelegate)(int);
TestDelegates() : A(Double), B(Double) { C = &TestDelegates::Triple; }
TestDelegates();
static int Double(int N) { return N * 2; }
int Triple(int N) { return N * 3; }
@ -367,16 +370,13 @@ enum struct MyEnum { A, B, C }; @@ -367,16 +370,13 @@ enum struct MyEnum { A, B, C };
class DLL_API TestArraysPointers
{
public:
TestArraysPointers(MyEnum *values, int count)
{
if (values && count) Value = values[0];
}
TestArraysPointers(MyEnum *values, int count);
MyEnum Value;
};
struct DLL_API TestGetterSetterToProperties
{
int getWidth() { return 640; }
int getHeight() { return 480; }
int getWidth();
int getHeight();
};

Loading…
Cancel
Save