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/ArgumentTest.cpp | 10 ++++----- test/core/common/RttiTest.cpp | 44 +++++++++++++++++++-------------------- test/core/managed/ManagedTest.cpp | 11 +++++----- test/core/model/NodeTest.cpp | 7 ++++--- 4 files changed, 36 insertions(+), 36 deletions(-) (limited to 'test') diff --git a/test/core/common/ArgumentTest.cpp b/test/core/common/ArgumentTest.cpp index e580986..d7d0d6a 100644 --- a/test/core/common/ArgumentTest.cpp +++ b/test/core/common/ArgumentTest.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include @@ -46,10 +46,10 @@ public: } namespace RttiTypes { -static const Rtti TestManaged1 = - RttiBuilder("TestManaged1"); -static const Rtti TestManaged2 = - RttiBuilder("TestManaged2").parent(&TestManaged1); +static const RttiType TestManaged1 = + RttiBuilder("TestManaged1"); +static const RttiType TestManaged2 = + RttiBuilder("TestManaged2").parent(&TestManaged1); } TEST(Argument, validateAny) 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}); diff --git a/test/core/managed/ManagedTest.cpp b/test/core/managed/ManagedTest.cpp index 0391738..b5a6e64 100644 --- a/test/core/managed/ManagedTest.cpp +++ b/test/core/managed/ManagedTest.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include "TestManaged.hpp" @@ -76,11 +77,11 @@ class TypeTestManaged5 : public Managed { using Managed::Managed; }; -static const Rtti Type1 = RttiBuilder{"Type1"}; -static const Rtti Type2 = RttiBuilder{"Type2"}; -static const Rtti Type3 = RttiBuilder{"Type3"}.parent(&Type1); -static const Rtti Type4 = - RttiBuilder{"Type4"}.parent({&Type3, &Type2}); +static const RttiType Type1 = RttiBuilder("Type1"); +static const RttiType Type2 = RttiBuilder("Type2"); +static const RttiType Type3 = RttiBuilder("Type3").parent(&Type1); +static const RttiType Type4 = + RttiBuilder("Type4").parent({&Type3, &Type2}); TEST(Managed, type) { diff --git a/test/core/model/NodeTest.cpp b/test/core/model/NodeTest.cpp index 8bbee05..aa6ef59 100644 --- a/test/core/model/NodeTest.cpp +++ b/test/core/model/NodeTest.cpp @@ -18,7 +18,7 @@ #include -#include +#include #include #include @@ -60,8 +60,9 @@ public: }; namespace RttiTypes { -const Rtti TestNode = - RttiBuilder("TestNode").parent(&RttiTypes::Node).composedOf(&TestNode); +const RttiType TestNode = RttiBuilder("TestNode") + .parent(&RttiTypes::Node) + .composedOf(&TestNode); } TEST(Node, isRoot) -- cgit v1.2.3