diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-18 18:41:30 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-18 18:41:30 +0100 |
commit | 66382c62af1be515deff66d51dba7f27e5fe4937 (patch) | |
tree | cdd661a560ef1f766889d661d8c7561d18bfbabb /test | |
parent | 7d788f2dce18c3ba6f11f7f032d35fef2e5fa9d4 (diff) |
Renamed RttiType to Rtti
Diffstat (limited to 'test')
-rw-r--r-- | test/core/common/ArgumentTest.cpp | 4 | ||||
-rw-r--r-- | test/core/common/RttiTest.cpp | 28 | ||||
-rw-r--r-- | test/core/common/VariantTest.cpp | 14 | ||||
-rw-r--r-- | test/core/managed/ManagedTest.cpp | 8 | ||||
-rw-r--r-- | test/core/model/DomainTest.cpp | 2 | ||||
-rw-r--r-- | test/core/model/NodeTest.cpp | 2 | ||||
-rw-r--r-- | test/core/model/TestDocumentBuilder.hpp | 2 |
7 files changed, 30 insertions, 30 deletions
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<ousia::TestManaged1>("TestManaged1"); -static const RttiType TestManaged2 = +static const Rtti TestManaged2 = RttiBuilder<ousia::TestManaged2>("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<RttiTestClass1>{"Type1"}; -const RttiType Type2 = RttiBuilder<RttiTestClass2>{"Type2"}; -const RttiType Type3 = RttiBuilder<RttiTestClass3>{"Type3"}.parent(&Type1); -const RttiType Type4 = +const Rtti Type1 = RttiBuilder<RttiTestClass1>{"Type1"}; +const Rtti Type2 = RttiBuilder<RttiTestClass2>{"Type2"}; +const Rtti Type3 = RttiBuilder<RttiTestClass3>{"Type3"}.parent(&Type1); +const Rtti Type4 = RttiBuilder<RttiTestClass4>{"Type4"}.parent({&Type3, &Type2}); -const RttiType Type5 = +const Rtti Type5 = RttiBuilder<RttiTestClass5>{"Type5"}.composedOf({&Type6, &Type7}); -const RttiType Type6 = RttiBuilder<RttiTestClass6>{"Type6"}.composedOf(&Type1); -const RttiType Type7 = RttiBuilder<RttiTestClass7>{"Type7"}.parent(&Type6); +const Rtti Type6 = RttiBuilder<RttiTestClass6>{"Type6"}.composedOf(&Type1); +const Rtti Type7 = RttiBuilder<RttiTestClass7>{"Type7"}.parent(&Type6); TEST(Rtti, isa) { @@ -82,7 +82,7 @@ TEST(Rtti, isa) TEST(Rtti, composedOf) { - std::vector<const RttiType *> types{&Type1, &Type2, &Type3, &Type4}; + std::vector<const Rtti *> 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<RttiMethodTestClass1>{"MType1"} .genericMethod( "a", std::make_shared<Method<RttiMethodTestClass1>>([]( @@ -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<RttiMethodTestClass2>{"MType2"} .parent(&MType1) .method("c", @@ -217,11 +217,11 @@ public: } }; -static const RttiType PType1 = RttiBuilder<RttiPropertyTestClass1>{ +static const Rtti PType1 = RttiBuilder<RttiPropertyTestClass1>{ "PType1"}.property("a", {RttiTypes::Int, RttiPropertyTestClass1::getA, RttiPropertyTestClass1::setA}); -static const RttiType PType2 = +static const Rtti PType2 = RttiBuilder<RttiPropertyTestClass2>{"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) diff --git a/test/core/managed/ManagedTest.cpp b/test/core/managed/ManagedTest.cpp index b5a6e64..c2b19cf 100644 --- a/test/core/managed/ManagedTest.cpp +++ b/test/core/managed/ManagedTest.cpp @@ -77,10 +77,10 @@ class TypeTestManaged5 : public Managed { using Managed::Managed; }; -static const RttiType Type1 = RttiBuilder<TypeTestManaged1>("Type1"); -static const RttiType Type2 = RttiBuilder<TypeTestManaged2>("Type2"); -static const RttiType Type3 = RttiBuilder<TypeTestManaged3>("Type3").parent(&Type1); -static const RttiType Type4 = +static const Rtti Type1 = RttiBuilder<TypeTestManaged1>("Type1"); +static const Rtti Type2 = RttiBuilder<TypeTestManaged2>("Type2"); +static const Rtti Type3 = RttiBuilder<TypeTestManaged3>("Type3").parent(&Type1); +static const Rtti Type4 = RttiBuilder<TypeTestManaged4>("Type4").parent({&Type3, &Type2}); TEST(Managed, type) diff --git a/test/core/model/DomainTest.cpp b/test/core/model/DomainTest.cpp index 5909841..62a0543 100644 --- a/test/core/model/DomainTest.cpp +++ b/test/core/model/DomainTest.cpp @@ -28,7 +28,7 @@ namespace ousia { namespace model { -void assert_path(const ResolutionResult &res, const RttiType &expected_type, +void assert_path(const ResolutionResult &res, const Rtti &expected_type, std::vector<std::string> expected_path) { // Check class/type diff --git a/test/core/model/NodeTest.cpp b/test/core/model/NodeTest.cpp index aa6ef59..a9a699d 100644 --- a/test/core/model/NodeTest.cpp +++ b/test/core/model/NodeTest.cpp @@ -60,7 +60,7 @@ public: }; namespace RttiTypes { -const RttiType TestNode = RttiBuilder<ousia::TestNode>("TestNode") +const Rtti TestNode = RttiBuilder<ousia::TestNode>("TestNode") .parent(&RttiTypes::Node) .composedOf(&TestNode); } diff --git a/test/core/model/TestDocumentBuilder.hpp b/test/core/model/TestDocumentBuilder.hpp index dc0479d..63d60eb 100644 --- a/test/core/model/TestDocumentBuilder.hpp +++ b/test/core/model/TestDocumentBuilder.hpp @@ -46,7 +46,7 @@ static std::string getPathString(const Path &path) static Rooted<Descriptor> resolveDescriptor(Handle<Document> doc, Logger &logger, const Path &path, - const RttiType &type) + const Rtti &type) { // use the actual resolve method. std::vector<ResolutionResult> resolved = doc->resolve(path, type); |