diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-05 20:51:14 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-05 20:51:14 +0100 |
commit | 0778a9446dc3475b887d20515165a4dc63ed0cd0 (patch) | |
tree | bbd6dc700feb72c5f5f35a204bed083080afa35a /test | |
parent | 15dd9d1aa1e0cfe8b31364fb42985ee8d5c5fc9d (diff) |
Replaced the term "aggregation" with "composition"
Diffstat (limited to 'test')
-rw-r--r-- | test/core/common/RttiTest.cpp | 62 | ||||
-rw-r--r-- | test/core/model/TypesystemTest.cpp | 260 |
2 files changed, 161 insertions, 161 deletions
diff --git a/test/core/common/RttiTest.cpp b/test/core/common/RttiTest.cpp index 1154fb5..e5d7571 100644 --- a/test/core/common/RttiTest.cpp +++ b/test/core/common/RttiTest.cpp @@ -81,42 +81,42 @@ TEST(Rtti, isa) ASSERT_TRUE(Type4.isa(Type4)); } -TEST(Rtti, aggregatedOf) +TEST(Rtti, composedOf) { std::vector<const RttiBase *> types{&Type1, &Type2, &Type3, &Type4}; for (auto t : types) { - ASSERT_FALSE(t->aggregatedOf(Type1)); - ASSERT_FALSE(t->aggregatedOf(Type2)); - ASSERT_FALSE(t->aggregatedOf(Type3)); - ASSERT_FALSE(t->aggregatedOf(Type4)); - ASSERT_FALSE(t->aggregatedOf(Type5)); - ASSERT_FALSE(t->aggregatedOf(Type6)); - ASSERT_FALSE(t->aggregatedOf(Type7)); + ASSERT_FALSE(t->composedOf(Type1)); + ASSERT_FALSE(t->composedOf(Type2)); + ASSERT_FALSE(t->composedOf(Type3)); + ASSERT_FALSE(t->composedOf(Type4)); + ASSERT_FALSE(t->composedOf(Type5)); + ASSERT_FALSE(t->composedOf(Type6)); + ASSERT_FALSE(t->composedOf(Type7)); } - ASSERT_TRUE(Type5.aggregatedOf(Type1)); - ASSERT_FALSE(Type5.aggregatedOf(Type2)); - ASSERT_FALSE(Type5.aggregatedOf(Type3)); - ASSERT_FALSE(Type5.aggregatedOf(Type4)); - ASSERT_FALSE(Type5.aggregatedOf(Type5)); - ASSERT_TRUE(Type5.aggregatedOf(Type6)); - ASSERT_TRUE(Type5.aggregatedOf(Type7)); - - ASSERT_TRUE(Type6.aggregatedOf(Type1)); - ASSERT_FALSE(Type6.aggregatedOf(Type2)); - ASSERT_FALSE(Type6.aggregatedOf(Type3)); - ASSERT_FALSE(Type6.aggregatedOf(Type4)); - ASSERT_FALSE(Type6.aggregatedOf(Type5)); - ASSERT_FALSE(Type6.aggregatedOf(Type6)); - ASSERT_FALSE(Type6.aggregatedOf(Type7)); - - ASSERT_TRUE(Type7.aggregatedOf(Type1)); - ASSERT_FALSE(Type7.aggregatedOf(Type2)); - ASSERT_FALSE(Type7.aggregatedOf(Type3)); - ASSERT_FALSE(Type7.aggregatedOf(Type4)); - ASSERT_FALSE(Type7.aggregatedOf(Type5)); - ASSERT_FALSE(Type7.aggregatedOf(Type6)); - ASSERT_FALSE(Type7.aggregatedOf(Type7)); + ASSERT_TRUE(Type5.composedOf(Type1)); + ASSERT_FALSE(Type5.composedOf(Type2)); + ASSERT_FALSE(Type5.composedOf(Type3)); + ASSERT_FALSE(Type5.composedOf(Type4)); + ASSERT_FALSE(Type5.composedOf(Type5)); + ASSERT_TRUE(Type5.composedOf(Type6)); + ASSERT_TRUE(Type5.composedOf(Type7)); + + ASSERT_TRUE(Type6.composedOf(Type1)); + ASSERT_FALSE(Type6.composedOf(Type2)); + ASSERT_FALSE(Type6.composedOf(Type3)); + ASSERT_FALSE(Type6.composedOf(Type4)); + ASSERT_FALSE(Type6.composedOf(Type5)); + ASSERT_FALSE(Type6.composedOf(Type6)); + ASSERT_FALSE(Type6.composedOf(Type7)); + + ASSERT_TRUE(Type7.composedOf(Type1)); + ASSERT_FALSE(Type7.composedOf(Type2)); + ASSERT_FALSE(Type7.composedOf(Type3)); + ASSERT_FALSE(Type7.composedOf(Type4)); + ASSERT_FALSE(Type7.composedOf(Type5)); + ASSERT_FALSE(Type7.composedOf(Type6)); + ASSERT_FALSE(Type7.composedOf(Type7)); } } } diff --git a/test/core/model/TypesystemTest.cpp b/test/core/model/TypesystemTest.cpp index 12efc46..c280716 100644 --- a/test/core/model/TypesystemTest.cpp +++ b/test/core/model/TypesystemTest.cpp @@ -38,19 +38,19 @@ TEST(StringType, rtti) ASSERT_TRUE(strType->isa(typeOf<Type>())); ASSERT_TRUE(strType->isa(typeOf<Node>())); ASSERT_TRUE(strType->isa(RttiTypes::StringType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(strType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(strType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(strType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(strType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(strType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(strType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(strType->composedOf(RttiTypes::SystemTypesystem)); } TEST(StringType, creation) @@ -127,19 +127,19 @@ TEST(IntType, rtti) ASSERT_TRUE(intType->isa(RttiTypes::IntType)); ASSERT_TRUE(intType->isa(typeOf<Type>())); ASSERT_TRUE(intType->isa(typeOf<Node>())); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(intType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(intType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(intType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(intType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(intType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(intType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(intType->composedOf(RttiTypes::SystemTypesystem)); } TEST(IntType, creation) @@ -180,19 +180,19 @@ TEST(DoubleType, rtti) ASSERT_TRUE(doubleType->isa(RttiTypes::DoubleType)); ASSERT_TRUE(doubleType->isa(typeOf<Type>())); ASSERT_TRUE(doubleType->isa(typeOf<Node>())); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(doubleType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(doubleType->composedOf(RttiTypes::SystemTypesystem)); } TEST(DoubleType, creation) @@ -240,19 +240,19 @@ TEST(BoolType, rtti) ASSERT_TRUE(boolType->isa(RttiTypes::BoolType)); ASSERT_TRUE(boolType->isa(typeOf<Type>())); ASSERT_TRUE(boolType->isa(typeOf<Node>())); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(boolType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(boolType->composedOf(RttiTypes::SystemTypesystem)); } TEST(BoolType, creation) @@ -301,19 +301,19 @@ TEST(EnumType, rtti) ASSERT_TRUE(enumType->isa(RttiTypes::EnumType)); ASSERT_TRUE(enumType->isa(typeOf<Type>())); ASSERT_TRUE(enumType->isa(typeOf<Node>())); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(enumType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(enumType->composedOf(RttiTypes::SystemTypesystem)); } TEST(EnumType, creation) @@ -478,19 +478,19 @@ TEST(StructType, rtti) ASSERT_TRUE(structType->isa(RttiTypes::StructType)); ASSERT_TRUE(structType->isa(typeOf<Type>())); ASSERT_TRUE(structType->isa(typeOf<Node>())); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::Constant)); - ASSERT_TRUE(structType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(structType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(structType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(structType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(structType->composedOf(RttiTypes::Constant)); + ASSERT_TRUE(structType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(structType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(structType->composedOf(RttiTypes::SystemTypesystem)); } TEST(StructType, creation) @@ -741,19 +741,19 @@ TEST(ArrayType, rtti) ASSERT_TRUE(arrayType->isa(RttiTypes::ArrayType)); ASSERT_TRUE(arrayType->isa(typeOf<Type>())); ASSERT_TRUE(arrayType->isa(typeOf<Node>())); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(arrayType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(arrayType->composedOf(RttiTypes::SystemTypesystem)); } TEST(ArrayType, creation) @@ -806,19 +806,19 @@ TEST(UnknownType, rtti) ASSERT_TRUE(unknownType->isa(RttiTypes::UnknownType)); ASSERT_TRUE(unknownType->isa(typeOf<Type>())); ASSERT_TRUE(unknownType->isa(typeOf<Node>())); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::BoolType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::EnumType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::Constant)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(unknownType->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::Type)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::StringType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::IntType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::DoubleType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::BoolType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::EnumType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::UnknownType)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::Constant)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(unknownType->composedOf(RttiTypes::SystemTypesystem)); } TEST(UnknownType, creation) @@ -849,19 +849,19 @@ TEST(Typesystem, rtti) { Manager mgr{1}; Rooted<Typesystem> typesystem{new Typesystem{mgr, "typesystem"}}; - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Type)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::StringType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::IntType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::BoolType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::EnumType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Constant)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Type)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::StringType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::IntType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::DoubleType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::BoolType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::EnumType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::UnknownType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Constant)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::SystemTypesystem)); } /* Class SystemTypesystem */ @@ -870,19 +870,19 @@ TEST(SystemTypesystem, rtti) { Manager mgr{1}; Rooted<SystemTypesystem> typesystem{new SystemTypesystem{mgr}}; - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Type)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::StringType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::IntType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::BoolType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::EnumType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::StructType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::ArrayType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::UnknownType)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Constant)); - ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Attribute)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::Typesystem)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::SystemTypesystem)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Type)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::StringType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::IntType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::DoubleType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::BoolType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::EnumType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::StructType)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::ArrayType)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::UnknownType)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Constant)); + ASSERT_TRUE(typesystem->composedOf(RttiTypes::Attribute)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::Typesystem)); + ASSERT_FALSE(typesystem->composedOf(RttiTypes::SystemTypesystem)); } |