Disable RTTI everywhere and fix Linux compilation

Former-commit-id: c8c0f11725d2e5b6c6da6dc3ab11f0eda065094f [formerly c2977e388c70ba7ccdf52f9eb97d7fe71ed6f4cf] [formerly 73c0d0759a6c9cad05dff59bff486f99fde336b6 [formerly 96a6e52ba5c97fd3a107fed5d11738466bd53f7e]]
Former-commit-id: c6a193ee5ccb07a40a74719937dbf224ad22081e [formerly 5f275dc02a44bd2ee54f6d926338ddfe388f565b]
Former-commit-id: e35640a20ac2269f96b75998e56fcba2fdbf6f00
This commit is contained in:
Lynix
2016-09-30 14:15:19 +02:00
parent 2f527091d5
commit 3461eb49ca
4 changed files with 28 additions and 6 deletions

View File

@@ -6,6 +6,18 @@ namespace
class TestComponent : public Ndk::Component<TestComponent>
{
public:
TestComponent(int value) :
m_value(value)
{
}
int GetValue() const
{
return m_value;
}
int m_value;
static Ndk::ComponentIndex componentIndex;
};
@@ -16,7 +28,7 @@ SCENARIO("Component", "[NDK][COMPONENT]")
{
GIVEN("Our TestComponent")
{
TestComponent testComponent;
TestComponent testComponent(42);
WHEN("We clone it")
{
@@ -24,7 +36,7 @@ SCENARIO("Component", "[NDK][COMPONENT]")
THEN("We should get a copy")
{
REQUIRE(dynamic_cast<TestComponent*>(clone.get()) != nullptr);
REQUIRE(static_cast<TestComponent*>(clone.get())->GetValue() == 42);
}
}
}