From a30e627ffccf36384689295ce54af32e38ef5ef8 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 18 Jan 2015 18:22:14 +0100 Subject: Droped Rtti class, using RttiType instead --- test/core/common/RttiTest.cpp | 44 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'test/core/common/RttiTest.cpp') diff --git a/test/core/common/RttiTest.cpp b/test/core/common/RttiTest.cpp index 5d02553..b8c1e7f 100644 --- a/test/core/common/RttiTest.cpp +++ b/test/core/common/RttiTest.cpp @@ -23,8 +23,7 @@ #include #include -#include -#include +#include #include namespace ousia { @@ -45,18 +44,18 @@ class RttiTestClass6 { class RttiTestClass7 { }; -extern const Rtti Type6; -extern const Rtti Type7; +extern const RttiType Type6; +extern const RttiType Type7; -const Rtti Type1 = RttiBuilder{"Type1"}; -const Rtti Type2 = RttiBuilder{"Type2"}; -const Rtti Type3 = RttiBuilder{"Type3"}.parent(&Type1); -const Rtti Type4 = - RttiBuilder{"Type4"}.parent({&Type3, &Type2}); -const Rtti Type5 = - RttiBuilder{"Type5"}.composedOf({&Type6, &Type7}); -const Rtti Type6 = RttiBuilder{"Type6"}.composedOf(&Type1); -const Rtti Type7 = RttiBuilder{"Type7"}.parent(&Type6); +const RttiType Type1 = RttiBuilder{"Type1"}; +const RttiType Type2 = RttiBuilder{"Type2"}; +const RttiType Type3 = RttiBuilder{"Type3"}.parent(&Type1); +const RttiType Type4 = + RttiBuilder{"Type4"}.parent({&Type3, &Type2}); +const RttiType Type5 = + RttiBuilder{"Type5"}.composedOf({&Type6, &Type7}); +const RttiType Type6 = RttiBuilder{"Type6"}.composedOf(&Type1); +const RttiType Type7 = RttiBuilder{"Type7"}.parent(&Type6); TEST(Rtti, isa) { @@ -124,8 +123,8 @@ class RttiMethodTestClass1 { class RttiMethodTestClass2 { }; -static const Rtti MType1 = - RttiBuilder{"MType1"} +static const RttiType MType1 = + RttiBuilder{"MType1"} .genericMethod( "a", std::make_shared>([]( Variant::arrayType &args, @@ -139,8 +138,8 @@ static const Rtti MType1 = Variant::arrayType &args, RttiMethodTestClass1 *thisPtr) { return Variant{"c"}; })); -static const Rtti MType2 = - TypedRttiBuilder{"MType2"} +static const RttiType MType2 = + RttiBuilder{"MType2"} .parent(&MType1) .method("c", [](Variant::arrayType &args, @@ -218,13 +217,12 @@ public: } }; -static const Rtti PType1 = - TypedRttiBuilder{"PType1"}.property( - "a", {RttiTypes::Int, RttiPropertyTestClass1::getA, - RttiPropertyTestClass1::setA}); +static const RttiType PType1 = RttiBuilder{ + "PType1"}.property("a", {RttiTypes::Int, RttiPropertyTestClass1::getA, + RttiPropertyTestClass1::setA}); -static const Rtti PType2 = - TypedRttiBuilder{"PType2"}.parent(&PType1).property( +static const RttiType PType2 = + RttiBuilder{"PType2"}.parent(&PType1).property( "b", {RttiTypes::Int, RttiPropertyTestClass2::getB, RttiPropertyTestClass2::setB}); -- cgit v1.2.3