From 5c8c0cc70b49c5fb2d85778c31c3d3f9a670d315 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sat, 3 Jan 2015 16:44:15 +0100 Subject: Renamed "contains" to aggregatedOf, added corresponding convenience function to Rtti class --- test/core/common/RttiTest.cpp | 62 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'test/core/common/RttiTest.cpp') 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 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)); } } } -- cgit v1.2.3