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/class/OrxonoxClassTest.cc

    r9601 r9649  
    11#include <gtest/gtest.h>
    22#include "core/class/OrxonoxClass.h"
     3#include "core/object/Context.h"
    34
    45namespace orxonox
     
    910        {
    1011        };
     12
     13        // Fixture
     14        class OrxonoxClassTest : public ::testing::Test
     15        {
     16            public:
     17                virtual void SetUp()
     18                {
     19                    Context::setRootContext(new Context(NULL));
     20                }
     21
     22                virtual void TearDown()
     23                {
     24                    Context::setRootContext(NULL);
     25                }
     26        };
    1127    }
    1228
    13     TEST(OrxonoxClassTest, CanCreate)
     29    TEST_F(OrxonoxClassTest, CanCreate)
    1430    {
    1531        TestClass* test = new TestClass();
Note: See TracChangeset for help on using the changeset viewer.