Changeset 9651 for code/branches/core6/test/core
- Timestamp:
- Aug 16, 2013, 9:20:59 PM (11 years ago)
- Location:
- code/branches/core6/test/core/class
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/test/core/class/IdentifierClassHierarchyTest.cc
r9646 r9651 130 130 virtual void SetUp() 131 131 { 132 registerClass("Context", new ClassFactoryWithContext<Context>()); 133 registerClass("Listable", new ClassFactoryWithContext<Listable>()); 132 134 registerClass("OrxonoxInterface", new ClassFactoryNoArgs<OrxonoxInterface>()); 133 135 registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>()); … … 230 232 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxInterface))); 231 233 232 EXPECT_EQ(2u, identifier->getParents().size()); 233 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 234 EXPECT_EQ(3u, identifier->getParents().size()); 235 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 236 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 234 237 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface))); 235 238 } … … 252 255 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxInterface))); 253 256 254 EXPECT_EQ(2u, identifier->getParents().size()); 255 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 257 EXPECT_EQ(3u, identifier->getParents().size()); 258 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 259 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 256 260 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface))); 257 261 } … … 274 278 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseInterface1))); 275 279 276 EXPECT_EQ(3u, identifier->getParents().size()); 277 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 280 EXPECT_EQ(4u, identifier->getParents().size()); 281 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 282 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 278 283 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface))); 279 284 EXPECT_TRUE(contains(identifier->getParents(), Class(BaseInterface1))); … … 295 300 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseInterface2))); 296 301 297 EXPECT_EQ(3u, identifier->getParents().size()); 298 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 302 EXPECT_EQ(4u, identifier->getParents().size()); 303 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 304 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 299 305 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface))); 300 306 EXPECT_TRUE(contains(identifier->getParents(), Class(BaseInterface2))); … … 322 328 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass))); 323 329 324 EXPECT_EQ(2u, identifier->getParents().size()); 325 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 330 EXPECT_EQ(3u, identifier->getParents().size()); 331 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 332 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 326 333 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass))); 327 334 } … … 338 345 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass))); 339 346 340 EXPECT_EQ(3u, identifier->getParents().size()); 341 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 347 EXPECT_EQ(4u, identifier->getParents().size()); 348 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 349 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 342 350 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass))); 343 351 EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass))); … … 356 364 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Interface1))); 357 365 358 EXPECT_EQ(6u, identifier->getParents().size()); 359 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 366 EXPECT_EQ(7u, identifier->getParents().size()); 367 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 368 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 360 369 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass))); 361 370 EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass))); … … 378 387 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Interface2))); 379 388 380 EXPECT_EQ(8u, identifier->getParents().size()); 381 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 389 EXPECT_EQ(9u, identifier->getParents().size()); 390 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 391 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 382 392 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass))); 383 393 EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass))); … … 402 412 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Interface2))); 403 413 404 EXPECT_EQ(8u, identifier->getParents().size()); 405 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 414 EXPECT_EQ(9u, identifier->getParents().size()); 415 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 416 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 406 417 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass))); 407 418 EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass))); … … 426 437 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseInterface2))); 427 438 428 EXPECT_EQ(6u, identifier->getParents().size()); 429 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 439 EXPECT_EQ(7u, identifier->getParents().size()); 440 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 441 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 430 442 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass))); 431 443 EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass))); -
code/branches/core6/test/core/class/IdentifierSimpleClassHierarchyTest.cc
r9646 r9651 46 46 virtual void SetUp() 47 47 { 48 registerClass("Context", new ClassFactoryWithContext<Context>()); 49 registerClass("Listable", new ClassFactoryWithContext<Listable>()); 48 50 registerClass("OrxonoxInterface", new ClassFactoryNoArgs<OrxonoxInterface>()); 49 51 registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>()); … … 99 101 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxInterface))); 100 102 101 EXPECT_EQ( 2u, identifier->getParents().size());103 EXPECT_EQ(3u, identifier->getParents().size()); 102 104 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 105 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 103 106 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface))); 104 107 } … … 117 120 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass))); 118 121 119 EXPECT_EQ( 2u, identifier->getParents().size());122 EXPECT_EQ(3u, identifier->getParents().size()); 120 123 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 124 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 121 125 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass))); 122 126 } … … 134 138 EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass))); 135 139 136 EXPECT_EQ( 5u, identifier->getParents().size());140 EXPECT_EQ(6u, identifier->getParents().size()); 137 141 EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable))); 142 EXPECT_TRUE(contains(identifier->getParents(), Class(Listable))); 138 143 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface))); 139 144 EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
Note: See TracChangeset
for help on using the changeset viewer.