Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 14, 2013, 6:42:28 PM (11 years ago)
Author:
landauf
Message:

added ability to set the root-context explicitly (and also to destroy it before the class-hierarchy is destroyed).
currently it's not possible to set the root context explicitly during startup of the game because it is already used by static initialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/test/core/object/ObjectListIteratorTest.cc

    r9605 r9649  
    1616                MOCK_METHOD0(test, void());
    1717        };
     18
     19        // Fixture
     20        class ObjectListIteratorTest : public ::testing::Test
     21        {
     22            public:
     23                virtual void SetUp()
     24                {
     25                    Context::setRootContext(new Context(NULL));
     26                }
     27
     28                virtual void TearDown()
     29                {
     30                    Context::setRootContext(NULL);
     31                }
     32        };
    1833    }
    1934
    20     TEST(ObjectListIteratorTest, CanCreateIterator)
     35    TEST_F(ObjectListIteratorTest, CanCreateIterator)
    2136    {
    2237        ObjectListIterator<ListableTest> it;
    2338    }
    2439
    25     TEST(ObjectListIteratorTest, CanAssignIterator)
     40    TEST_F(ObjectListIteratorTest, CanAssignIterator)
    2641    {
    2742        ObjectListIterator<ListableTest> it = ObjectList<ListableTest>::begin();
    2843    }
    2944
    30     TEST(ObjectListIteratorTest, CanIterateOverEmptyList)
     45    TEST_F(ObjectListIteratorTest, CanIterateOverEmptyList)
    3146    {
    3247        size_t i = 0;
     
    3651    }
    3752
    38     TEST(ObjectListIteratorTest, CanIterateOverFullList)
     53    TEST_F(ObjectListIteratorTest, CanIterateOverFullList)
    3954    {
    4055        ListableTest test1;
     
    5368    }
    5469
    55     TEST(ObjectListIteratorTest, CanIterateReverseOverFullList)
     70    TEST_F(ObjectListIteratorTest, CanIterateReverseOverFullList)
    5671    {
    5772        ListableTest test1;
     
    7085    }
    7186
    72     TEST(ObjectListIteratorTest, CanCallObjects)
     87    TEST_F(ObjectListIteratorTest, CanCallObjects)
    7388    {
    7489        ListableTest test1;
Note: See TracChangeset for help on using the changeset viewer.