From 66382c62af1be515deff66d51dba7f27e5fe4937 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 18 Jan 2015 18:41:30 +0100 Subject: Renamed RttiType to Rtti --- test/core/common/ArgumentTest.cpp | 4 ++-- test/core/common/RttiTest.cpp | 28 ++++++++++++++-------------- test/core/common/VariantTest.cpp | 14 +++++++------- 3 files changed, 23 insertions(+), 23 deletions(-) (limited to 'test/core/common') diff --git a/test/core/common/ArgumentTest.cpp b/test/core/common/ArgumentTest.cpp index d7d0d6a..5580e00 100644 --- a/test/core/common/ArgumentTest.cpp +++ b/test/core/common/ArgumentTest.cpp @@ -46,9 +46,9 @@ public: } namespace RttiTypes { -static const RttiType TestManaged1 = +static const Rtti TestManaged1 = RttiBuilder("TestManaged1"); -static const RttiType TestManaged2 = +static const Rtti TestManaged2 = RttiBuilder("TestManaged2").parent(&TestManaged1); } diff --git a/test/core/common/RttiTest.cpp b/test/core/common/RttiTest.cpp index b8c1e7f..019750a 100644 --- a/test/core/common/RttiTest.cpp +++ b/test/core/common/RttiTest.cpp @@ -44,18 +44,18 @@ class RttiTestClass6 { class RttiTestClass7 { }; -extern const RttiType Type6; -extern const RttiType Type7; +extern const Rtti Type6; +extern const Rtti Type7; -const RttiType Type1 = RttiBuilder{"Type1"}; -const RttiType Type2 = RttiBuilder{"Type2"}; -const RttiType Type3 = RttiBuilder{"Type3"}.parent(&Type1); -const RttiType Type4 = +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 RttiType Type5 = +const Rtti Type5 = RttiBuilder{"Type5"}.composedOf({&Type6, &Type7}); -const RttiType Type6 = RttiBuilder{"Type6"}.composedOf(&Type1); -const RttiType Type7 = RttiBuilder{"Type7"}.parent(&Type6); +const Rtti Type6 = RttiBuilder{"Type6"}.composedOf(&Type1); +const Rtti Type7 = RttiBuilder{"Type7"}.parent(&Type6); TEST(Rtti, isa) { @@ -82,7 +82,7 @@ TEST(Rtti, isa) TEST(Rtti, composedOf) { - std::vector types{&Type1, &Type2, &Type3, &Type4}; + std::vector types{&Type1, &Type2, &Type3, &Type4}; for (auto t : types) { ASSERT_FALSE(t->composedOf(Type1)); ASSERT_FALSE(t->composedOf(Type2)); @@ -123,7 +123,7 @@ class RttiMethodTestClass1 { class RttiMethodTestClass2 { }; -static const RttiType MType1 = +static const Rtti MType1 = RttiBuilder{"MType1"} .genericMethod( "a", std::make_shared>([]( @@ -138,7 +138,7 @@ static const RttiType MType1 = Variant::arrayType &args, RttiMethodTestClass1 *thisPtr) { return Variant{"c"}; })); -static const RttiType MType2 = +static const Rtti MType2 = RttiBuilder{"MType2"} .parent(&MType1) .method("c", @@ -217,11 +217,11 @@ public: } }; -static const RttiType PType1 = RttiBuilder{ +static const Rtti PType1 = RttiBuilder{ "PType1"}.property("a", {RttiTypes::Int, RttiPropertyTestClass1::getA, RttiPropertyTestClass1::setA}); -static const RttiType PType2 = +static const Rtti PType2 = RttiBuilder{"PType2"}.parent(&PType1).property( "b", {RttiTypes::Int, RttiPropertyTestClass2::getB, RttiPropertyTestClass2::setB}); diff --git a/test/core/common/VariantTest.cpp b/test/core/common/VariantTest.cpp index 3903c1d..00109d9 100644 --- a/test/core/common/VariantTest.cpp +++ b/test/core/common/VariantTest.cpp @@ -40,7 +40,7 @@ TEST(Variant, nullValue) ASSERT_TRUE(v.isNull()); ASSERT_EQ(VariantType::NULLPTR, v.getType()); - ASSERT_EQ(&RttiTypes::Nullptr, &v.getRttiType()); + ASSERT_EQ(&RttiTypes::Nullptr, &v.getRtti()); } TEST(Variant, booleanValue) @@ -57,7 +57,7 @@ TEST(Variant, booleanValue) ASSERT_TRUE(v.isBool()); ASSERT_TRUE(v.asBool()); ASSERT_EQ(VariantType::BOOL, v.getType()); - ASSERT_EQ(&RttiTypes::Bool, &v.getRttiType()); + ASSERT_EQ(&RttiTypes::Bool, &v.getRtti()); v = nullptr; ASSERT_FALSE(v.isBool()); @@ -73,7 +73,7 @@ TEST(Variant, intValue) ASSERT_TRUE(v.isInt()); ASSERT_EQ(43, v.asInt()); ASSERT_EQ(VariantType::INT, v.getType()); - ASSERT_EQ(&RttiTypes::Int, &v.getRttiType()); + ASSERT_EQ(&RttiTypes::Int, &v.getRtti()); v = false; ASSERT_FALSE(v.isInt()); @@ -92,7 +92,7 @@ TEST(Variant, doubleValue) ASSERT_TRUE(v.isDouble()); ASSERT_EQ(43.5, v.asDouble()); ASSERT_EQ(VariantType::DOUBLE, v.getType()); - ASSERT_EQ(&RttiTypes::Double, &v.getRttiType()); + ASSERT_EQ(&RttiTypes::Double, &v.getRtti()); } TEST(Variant, stringValue) @@ -105,7 +105,7 @@ TEST(Variant, stringValue) ASSERT_TRUE(v.isString()); ASSERT_EQ("Goodbye Cruel World", v.asString()); ASSERT_EQ(VariantType::STRING, v.getType()); - ASSERT_EQ(&RttiTypes::String, &v.getRttiType()); + ASSERT_EQ(&RttiTypes::String, &v.getRtti()); v = 42; ASSERT_FALSE(v.isString()); @@ -133,7 +133,7 @@ TEST(Variant, arrayValue) ASSERT_TRUE(v.isArray()); ASSERT_EQ(VariantType::ARRAY, v.getType()); - ASSERT_EQ(&RttiTypes::Array, &v.getRttiType()); + ASSERT_EQ(&RttiTypes::Array, &v.getRtti()); } TEST(Variant, mapValue) @@ -151,7 +151,7 @@ TEST(Variant, mapValue) ASSERT_TRUE(v.isMap()); ASSERT_EQ(VariantType::MAP, v.getType()); - ASSERT_EQ(&RttiTypes::Map, &v.getRttiType()); + ASSERT_EQ(&RttiTypes::Map, &v.getRtti()); } TEST(Variant, relationalOperators) -- cgit v1.2.3