Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 16, 2013, 9:20:59 PM (11 years ago)
Author:
landauf
Message:

register Listable in the framework

Location:
code/branches/core6/test/core/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/test/core/class/IdentifierClassHierarchyTest.cc

    r9646 r9651  
    130130                virtual void SetUp()
    131131                {
     132                    registerClass("Context", new ClassFactoryWithContext<Context>());
     133                    registerClass("Listable", new ClassFactoryWithContext<Listable>());
    132134                    registerClass("OrxonoxInterface", new ClassFactoryNoArgs<OrxonoxInterface>());
    133135                    registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
     
    230232        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxInterface)));
    231233
    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)));
    234237        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    235238    }
     
    252255        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxInterface)));
    253256
    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)));
    256260        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    257261    }
     
    274278        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseInterface1)));
    275279
    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)));
    278283        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    279284        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseInterface1)));
     
    295300        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseInterface2)));
    296301
    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)));
    299305        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    300306        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseInterface2)));
     
    322328        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)));
    323329
    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)));
    326333        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    327334    }
     
    338345        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
    339346
    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)));
    342350        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    343351        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
     
    356364        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Interface1)));
    357365
    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)));
    360369        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    361370        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
     
    378387        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Interface2)));
    379388
    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)));
    382392        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    383393        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
     
    402412        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Interface2)));
    403413
    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)));
    406417        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    407418        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
     
    426437        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseInterface2)));
    427438
    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)));
    430442        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    431443        EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
  • code/branches/core6/test/core/class/IdentifierSimpleClassHierarchyTest.cc

    r9646 r9651  
    4646                virtual void SetUp()
    4747                {
     48                    registerClass("Context", new ClassFactoryWithContext<Context>());
     49                    registerClass("Listable", new ClassFactoryWithContext<Listable>());
    4850                    registerClass("OrxonoxInterface", new ClassFactoryNoArgs<OrxonoxInterface>());
    4951                    registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
     
    99101        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxInterface)));
    100102
    101         EXPECT_EQ(2u, identifier->getParents().size());
     103        EXPECT_EQ(3u, identifier->getParents().size());
    102104        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     105        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
    103106        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    104107    }
     
    117120        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)));
    118121
    119         EXPECT_EQ(2u, identifier->getParents().size());
     122        EXPECT_EQ(3u, identifier->getParents().size());
    120123        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     124        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
    121125        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
    122126    }
     
    134138        EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
    135139
    136         EXPECT_EQ(5u, identifier->getParents().size());
     140        EXPECT_EQ(6u, identifier->getParents().size());
    137141        EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
     142        EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
    138143        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxInterface)));
    139144        EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
Note: See TracChangeset for help on using the changeset viewer.