diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-03 16:44:15 +0100 |
---|---|---|
committer | Andreas Stöckel <andreas@somweyr.de> | 2015-01-03 16:44:15 +0100 |
commit | 5c8c0cc70b49c5fb2d85778c31c3d3f9a670d315 (patch) | |
tree | c659c883819b556910eabcbf10faf89fc769bc89 /test/core/common/RttiTest.cpp | |
parent | 603dedfa2b3704730fa4db8e7f84702b26da9ae6 (diff) |
Renamed "contains" to aggregatedOf, added corresponding convenience function to Rtti class
Diffstat (limited to 'test/core/common/RttiTest.cpp')
-rw-r--r-- | test/core/common/RttiTest.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/test/core/common/RttiTest.cpp b/test/core/common/RttiTest.cpp index fdeb8f0..e875efa 100644 --- a/test/core/common/RttiTest.cpp +++ b/test/core/common/RttiTest.cpp @@ -76,42 +76,42 @@ TEST(Rtti, isa) ASSERT_TRUE(Type4.isa(Type4)); } -TEST(Rtti, contains) +TEST(Rtti, aggregatedOf) { std::vector<const RttiBase *> types{&Type1, &Type2, &Type3, &Type4}; for (auto t : types) { - ASSERT_FALSE(t->contains(Type1)); - ASSERT_FALSE(t->contains(Type2)); - ASSERT_FALSE(t->contains(Type3)); - ASSERT_FALSE(t->contains(Type4)); - ASSERT_FALSE(t->contains(Type5)); - ASSERT_FALSE(t->contains(Type6)); - ASSERT_FALSE(t->contains(Type7)); + 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_TRUE(Type5.contains(Type1)); - ASSERT_FALSE(Type5.contains(Type2)); - ASSERT_FALSE(Type5.contains(Type3)); - ASSERT_FALSE(Type5.contains(Type4)); - ASSERT_FALSE(Type5.contains(Type5)); - ASSERT_TRUE(Type5.contains(Type6)); - ASSERT_TRUE(Type5.contains(Type7)); - - ASSERT_TRUE(Type6.contains(Type1)); - ASSERT_FALSE(Type6.contains(Type2)); - ASSERT_FALSE(Type6.contains(Type3)); - ASSERT_FALSE(Type6.contains(Type4)); - ASSERT_FALSE(Type6.contains(Type5)); - ASSERT_FALSE(Type6.contains(Type6)); - ASSERT_FALSE(Type6.contains(Type7)); - - ASSERT_TRUE(Type7.contains(Type1)); - ASSERT_FALSE(Type7.contains(Type2)); - ASSERT_FALSE(Type7.contains(Type3)); - ASSERT_FALSE(Type7.contains(Type4)); - ASSERT_FALSE(Type7.contains(Type5)); - ASSERT_FALSE(Type7.contains(Type6)); - ASSERT_FALSE(Type7.contains(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)); } } } |