From db2e1a43707e65851ba13e3e51f791abe20e270b Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Mon, 5 Jan 2015 00:41:24 +0100 Subject: Changed aggregation descriptor of the Typesystem class --- src/core/model/Typesystem.cpp | 11 ++++++----- test/core/model/TypesystemTest.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/core/model/Typesystem.cpp b/src/core/model/Typesystem.cpp index 24be67f..2945635 100644 --- a/src/core/model/Typesystem.cpp +++ b/src/core/model/Typesystem.cpp @@ -450,11 +450,12 @@ const Rtti UnknownType{"UnknownType", {&Type}}; const Rtti Constant{"Constant", {&Node}}; const Rtti Attribute{"Attribute", {&Node}}; const Rtti Typesystem{ - "Typesystem", {&Node}, {&StructType, &EnumType, &Constant}}; -const Rtti SystemTypesystem{ - "SystemTypesystem", - {&Typesystem}, - {&StringType, &IntType, &DoubleType, &BoolType, &EnumType}}; + "Typesystem", + {&Node}, + {&StringType, &IntType, &DoubleType, &BoolType, &EnumType, &StructType, + &Constant}}; +const Rtti SystemTypesystem{"SystemTypesystem", + {&Typesystem}}; } } diff --git a/test/core/model/TypesystemTest.cpp b/test/core/model/TypesystemTest.cpp index 72762e5..12efc46 100644 --- a/test/core/model/TypesystemTest.cpp +++ b/test/core/model/TypesystemTest.cpp @@ -850,10 +850,10 @@ TEST(Typesystem, rtti) Manager mgr{1}; Rooted typesystem{new Typesystem{mgr, "typesystem"}}; ASSERT_TRUE(typesystem->aggregatedOf(RttiTypes::Type)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::StringType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::IntType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::DoubleType)); - ASSERT_FALSE(typesystem->aggregatedOf(RttiTypes::BoolType)); + 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)); -- cgit v1.2.3