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/IteratorTest.cc

    r9607 r9649  
    2323                MOCK_METHOD0(test, void());
    2424        };
     25
     26        // Fixture
     27        class IteratorTest : public ::testing::Test
     28        {
     29            public:
     30                virtual void SetUp()
     31                {
     32                    Context::setRootContext(new Context(NULL));
     33                }
     34
     35                virtual void TearDown()
     36                {
     37                    Context::setRootContext(NULL);
     38                }
     39        };
    2540    }
    2641
    27     TEST(IteratorTest, CanCreateIterator)
     42    TEST_F(IteratorTest, CanCreateIterator)
    2843    {
    2944        Iterator<TestInterface> it;
    3045    }
    3146
    32     TEST(IteratorTest, CanAssignIterator)
     47    TEST_F(IteratorTest, CanAssignIterator)
    3348    {
    3449        Iterator<TestInterface> it = ObjectList<TestInterface>::begin();
    3550    }
    3651
    37     TEST(IteratorTest, CanIterateOverEmptyList)
     52    TEST_F(IteratorTest, CanIterateOverEmptyList)
    3853    {
    3954        size_t i = 0;
     
    4358    }
    4459
    45     TEST(IteratorTest, CanCallObjects)
     60    TEST_F(IteratorTest, CanCallObjects)
    4661    {
    4762        TestClass test1;
Note: See TracChangeset for help on using the changeset viewer.