Bug Summary

File:core/class/IdentifierSimpleClassHierarchyTest.cc
Location:line 54, column 21
Description:Potential memory leak

Annotated Source Code

1#include <gtest/gtest.h>
2#include "core/CoreIncludes.h"
3#include "core/class/Identifiable.h"
4#include "core/class/OrxonoxClass.h"
5#include "core/class/OrxonoxInterface.h"
6#include "core/module/ModuleInstance.h"
7
8namespace orxonox
9{
10 namespace
11 {
12 class Interface : virtual public OrxonoxInterface
13 {
14 public:
15 Interface()
16 {
17 RegisterObject(Interface)if (ClassIdentifier<Interface>::getIdentifier()->initializeObject
(this)) return; else ((void)0)
;
18 }
19
20 virtual void test() = 0;
21 };
22
23 class BaseClass : public OrxonoxClass
24 {
25 public:
26 BaseClass()
27 {
28 RegisterObject(BaseClass)if (ClassIdentifier<BaseClass>::getIdentifier()->initializeObject
(this)) return; else ((void)0)
;
29 }
30 };
31
32 class RealClass : public BaseClass, public Interface
33 {
34 public:
35 RealClass()
36 {
37 RegisterObject(RealClass)if (ClassIdentifier<RealClass>::getIdentifier()->initializeObject
(this)) return; else ((void)0)
;
38 }
39
40 virtual void test() override {}
41 };
42
43 RegisterAbstractClass(Interface)orxonox::SI_I& _InterfaceIdentifier = (*new orxonox::SI_I
(orxonox::registerClass<Interface>("Interface", static_cast
<ClassFactory<Interface>*>(nullptr), false)))
.inheritsFrom<OrxonoxInterface>();
44 RegisterClassNoArgs(BaseClass)orxonox::SI_I& _BaseClassIdentifier = (*new orxonox::SI_I
(orxonox::registerClass<BaseClass>("BaseClass", new orxonox
::ClassFactoryNoArgs<BaseClass>(), true)))
;
45 RegisterClassNoArgs(RealClass)orxonox::SI_I& _RealClassIdentifier = (*new orxonox::SI_I
(orxonox::registerClass<RealClass>("RealClass", new orxonox
::ClassFactoryNoArgs<RealClass>(), true)))
;
46
47 // Fixture
48 class IdentifierSimpleClassHierarchyTest : public ::testing::Test
49 {
50 public:
51 virtual void SetUp() override
52 {
53 new IdentifierManager();
1
Memory is allocated
54 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
2
Potential memory leak
55 Context::setRootContext(new Context(nullptr));
56 Identifier::initConfigValues_s = false; // TODO: hack!
57 IdentifierManager::getInstance().createClassHierarchy();
58 }
59
60 virtual void TearDown() override
61 {
62 IdentifierManager::getInstance().destroyClassHierarchy();
63 Context::destroyRootContext();
64 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
65 delete &IdentifierManager::getInstance();
66 }
67 };
68
69 bool contains(const std::list<const Identifier*> identifiers, Identifier* identifier)
70 {
71 return std::find(identifiers.begin(), identifiers.end(), identifier) != identifiers.end();
72 }
73
74 bool contains(const std::set<const Identifier*> identifiers, Identifier* identifier)
75 {
76 return identifiers.find(identifier) != identifiers.end();
77 }
78 }
79
80 TEST_F(IdentifierSimpleClassHierarchyTest, TestInterface)class IdentifierSimpleClassHierarchyTest_TestInterface_Test :
public IdentifierSimpleClassHierarchyTest { public: IdentifierSimpleClassHierarchyTest_TestInterface_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IdentifierSimpleClassHierarchyTest_TestInterface_Test
(IdentifierSimpleClassHierarchyTest_TestInterface_Test const &
); void operator=(IdentifierSimpleClassHierarchyTest_TestInterface_Test
const &);};::testing::TestInfo* const IdentifierSimpleClassHierarchyTest_TestInterface_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IdentifierSimpleClassHierarchyTest", "TestInterface", __null
, __null, (::testing::internal::GetTypeId<IdentifierSimpleClassHierarchyTest
>()), IdentifierSimpleClassHierarchyTest::SetUpTestCase, IdentifierSimpleClassHierarchyTest
::TearDownTestCase, new ::testing::internal::TestFactoryImpl<
IdentifierSimpleClassHierarchyTest_TestInterface_Test>);void
IdentifierSimpleClassHierarchyTest_TestInterface_Test::TestBody
()
81 {
82 Identifier* identifier = Class(Interface)orxonox::ClassIdentifier<Interface>::getIdentifier();
83
84 EXPECT_EQ(1u, identifier->getDirectChildren().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"identifier->getDirectChildren().size()", 1u, identifier->
getDirectChildren().size()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 84, gtest_ar.failure_message()) = ::testing::Message()
;
85 EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(RealClass)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getDirectChildren(), orxonox::ClassIdentifier<RealClass>
::getIdentifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 85, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getDirectChildren(), Class(RealClass))"
, "false", "true").c_str()) = ::testing::Message()
;
86
87 EXPECT_EQ(1u, identifier->getChildren().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"identifier->getChildren().size()", 1u, identifier->getChildren
().size()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 87, gtest_ar.failure_message()) = ::testing::Message()
;
88 EXPECT_TRUE(contains(identifier->getChildren(), Class(RealClass)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getChildren(), orxonox::ClassIdentifier<RealClass>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 88, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getChildren(), Class(RealClass))",
"false", "true").c_str()) = ::testing::Message()
;
89
90 EXPECT_EQ(1u, identifier->getDirectParents().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"identifier->getDirectParents().size()", 1u, identifier->
getDirectParents().size()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 90, gtest_ar.failure_message()) = ::testing::Message()
;
91 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxInterface)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getDirectParents(), orxonox::ClassIdentifier<OrxonoxInterface
>::getIdentifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 91, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getDirectParents(), Class(OrxonoxInterface))"
, "false", "true").c_str()) = ::testing::Message()
;
92
93 EXPECT_EQ(4u, identifier->getParents().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4u)) == 1)>::Compare("4u",
"identifier->getParents().size()", 4u, identifier->getParents
().size()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 93, gtest_ar.failure_message()) = ::testing::Message()
;
94 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<Identifiable>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 94, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(Identifiable))"
, "false", "true").c_str()) = ::testing::Message()
;
95 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<Listable>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 95, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(Listable))", "false"
, "true").c_str()) = ::testing::Message()
;
96 EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<Configurable>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 96, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(Configurable))"
, "false", "true").c_str()) = ::testing::Message()
;
97 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<OrxonoxInterface>
::getIdentifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 97, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(OrxonoxInterface))"
, "false", "true").c_str()) = ::testing::Message()
;
98 }
99
100 TEST_F(IdentifierSimpleClassHierarchyTest, BaseClass)class IdentifierSimpleClassHierarchyTest_BaseClass_Test : public
IdentifierSimpleClassHierarchyTest { public: IdentifierSimpleClassHierarchyTest_BaseClass_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IdentifierSimpleClassHierarchyTest_BaseClass_Test
(IdentifierSimpleClassHierarchyTest_BaseClass_Test const &
); void operator=(IdentifierSimpleClassHierarchyTest_BaseClass_Test
const &);};::testing::TestInfo* const IdentifierSimpleClassHierarchyTest_BaseClass_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IdentifierSimpleClassHierarchyTest", "BaseClass", __null, __null
, (::testing::internal::GetTypeId<IdentifierSimpleClassHierarchyTest
>()), IdentifierSimpleClassHierarchyTest::SetUpTestCase, IdentifierSimpleClassHierarchyTest
::TearDownTestCase, new ::testing::internal::TestFactoryImpl<
IdentifierSimpleClassHierarchyTest_BaseClass_Test>);void IdentifierSimpleClassHierarchyTest_BaseClass_Test
::TestBody()
101 {
102 Identifier* identifier = Class(BaseClass)orxonox::ClassIdentifier<BaseClass>::getIdentifier();
103
104 EXPECT_EQ(1u, identifier->getDirectChildren().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"identifier->getDirectChildren().size()", 1u, identifier->
getDirectChildren().size()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 104, gtest_ar.failure_message()) = ::testing::Message()
;
105 EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(RealClass)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getDirectChildren(), orxonox::ClassIdentifier<RealClass>
::getIdentifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 105, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getDirectChildren(), Class(RealClass))"
, "false", "true").c_str()) = ::testing::Message()
;
106
107 EXPECT_EQ(1u, identifier->getChildren().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"identifier->getChildren().size()", 1u, identifier->getChildren
().size()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 107, gtest_ar.failure_message()) = ::testing::Message()
;
108 EXPECT_TRUE(contains(identifier->getChildren(), Class(RealClass)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getChildren(), orxonox::ClassIdentifier<RealClass>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 108, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getChildren(), Class(RealClass))",
"false", "true").c_str()) = ::testing::Message()
;
109
110 EXPECT_EQ(1u, identifier->getDirectParents().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(1u)) == 1)>::Compare("1u",
"identifier->getDirectParents().size()", 1u, identifier->
getDirectParents().size()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 110, gtest_ar.failure_message()) = ::testing::Message()
;
111 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getDirectParents(), orxonox::ClassIdentifier<OrxonoxClass>
::getIdentifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 111, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getDirectParents(), Class(OrxonoxClass))"
, "false", "true").c_str()) = ::testing::Message()
;
112
113 EXPECT_EQ(4u, identifier->getParents().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(4u)) == 1)>::Compare("4u",
"identifier->getParents().size()", 4u, identifier->getParents
().size()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 113, gtest_ar.failure_message()) = ::testing::Message()
;
114 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<Identifiable>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 114, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(Identifiable))"
, "false", "true").c_str()) = ::testing::Message()
;
115 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<Listable>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 115, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(Listable))", "false"
, "true").c_str()) = ::testing::Message()
;
116 EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<Configurable>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 116, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(Configurable))"
, "false", "true").c_str()) = ::testing::Message()
;
117 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<OrxonoxClass>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 117, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(OrxonoxClass))"
, "false", "true").c_str()) = ::testing::Message()
;
118 }
119
120 TEST_F(IdentifierSimpleClassHierarchyTest, RealClass)class IdentifierSimpleClassHierarchyTest_RealClass_Test : public
IdentifierSimpleClassHierarchyTest { public: IdentifierSimpleClassHierarchyTest_RealClass_Test
() {} private: virtual void TestBody(); static ::testing::TestInfo
* const test_info_ __attribute__ ((unused)); IdentifierSimpleClassHierarchyTest_RealClass_Test
(IdentifierSimpleClassHierarchyTest_RealClass_Test const &
); void operator=(IdentifierSimpleClassHierarchyTest_RealClass_Test
const &);};::testing::TestInfo* const IdentifierSimpleClassHierarchyTest_RealClass_Test
::test_info_ = ::testing::internal::MakeAndRegisterTestInfo(
"IdentifierSimpleClassHierarchyTest", "RealClass", __null, __null
, (::testing::internal::GetTypeId<IdentifierSimpleClassHierarchyTest
>()), IdentifierSimpleClassHierarchyTest::SetUpTestCase, IdentifierSimpleClassHierarchyTest
::TearDownTestCase, new ::testing::internal::TestFactoryImpl<
IdentifierSimpleClassHierarchyTest_RealClass_Test>);void IdentifierSimpleClassHierarchyTest_RealClass_Test
::TestBody()
121 {
122 Identifier* identifier = Class(RealClass)orxonox::ClassIdentifier<RealClass>::getIdentifier();
123
124 EXPECT_EQ(0u, identifier->getDirectChildren().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"identifier->getDirectChildren().size()", 0u, identifier->
getDirectChildren().size()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 124, gtest_ar.failure_message()) = ::testing::Message()
;
125
126 EXPECT_EQ(0u, identifier->getChildren().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(0u)) == 1)>::Compare("0u",
"identifier->getChildren().size()", 0u, identifier->getChildren
().size()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 126, gtest_ar.failure_message()) = ::testing::Message()
;
127
128 EXPECT_EQ(2u, identifier->getDirectParents().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(2u)) == 1)>::Compare("2u",
"identifier->getDirectParents().size()", 2u, identifier->
getDirectParents().size()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 128, gtest_ar.failure_message()) = ::testing::Message()
;
129 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Interface)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getDirectParents(), orxonox::ClassIdentifier<Interface>
::getIdentifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 129, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getDirectParents(), Class(Interface))"
, "false", "true").c_str()) = ::testing::Message()
;
130 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getDirectParents(), orxonox::ClassIdentifier<BaseClass>
::getIdentifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 130, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getDirectParents(), Class(BaseClass))"
, "false", "true").c_str()) = ::testing::Message()
;
131
132 EXPECT_EQ(7u, identifier->getParents().size())switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing
::internal::IsNullLiteralHelper(7u)) == 1)>::Compare("7u",
"identifier->getParents().size()", 7u, identifier->getParents
().size()))) ; else ::testing::internal::AssertHelper(::testing
::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 132, gtest_ar.failure_message()) = ::testing::Message()
;
133 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<Identifiable>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 133, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(Identifiable))"
, "false", "true").c_str()) = ::testing::Message()
;
134 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<Listable>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 134, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(Listable))", "false"
, "true").c_str()) = ::testing::Message()
;
135 EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<Configurable>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 135, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(Configurable))"
, "false", "true").c_str()) = ::testing::Message()
;
136 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<OrxonoxInterface>
::getIdentifier()))) ; else ::testing::internal::AssertHelper
(::testing::TestPartResult::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 136, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(OrxonoxInterface))"
, "false", "true").c_str()) = ::testing::Message()
;
137 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<OrxonoxClass>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 137, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(OrxonoxClass))"
, "false", "true").c_str()) = ::testing::Message()
;
138 EXPECT_TRUE(contains(identifier->getParents(), Class(Interface)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<Interface>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 138, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(Interface))", "false"
, "true").c_str()) = ::testing::Message()
;
139 EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)))switch (0) case 0: default: if (const ::testing::AssertionResult
gtest_ar_ = ::testing::AssertionResult(contains(identifier->
getParents(), orxonox::ClassIdentifier<BaseClass>::getIdentifier
()))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult
::kNonFatalFailure, "/home/jenkins/workspace/orxonox_qc_trunk_checks/test/core/class/IdentifierSimpleClassHierarchyTest.cc"
, 139, ::testing::internal::GetBoolAssertionFailureMessage( gtest_ar_
, "contains(identifier->getParents(), Class(BaseClass))", "false"
, "true").c_str()) = ::testing::Message()
;
140 }
141}