Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2015, 11:19:15 PM (9 years ago)
Author:
landauf
Message:

StaticallyInitializedScopedSingletonWrapper registers ScopedSingletonWrapper in ScopeManager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/test/core/singleton/ScopeTest.cc

    r10459 r10460  
    11#include <gtest/gtest.h>
    22#include "core/singleton/ScopedSingletonIncludes.h"
     3#include "core/module/ModuleInstance.h"
    34
    45namespace orxonox
     
    1920        ManageScopedSingleton(TestSingletonRoot, ScopeID::Root, false);
    2021        ManageScopedSingleton(TestSingletonGraphics, ScopeID::Graphics, false);
     22
     23        // Fixture
     24        class ScopeTest : public ::testing::Test
     25        {
     26            public:
     27                virtual void SetUp()
     28                {
     29                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
     30                }
     31
     32                virtual void TearDown()
     33                {
     34                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
     35                }
     36        };
    2137    }
    2238
    23     TEST(Scope, ScopesDoNotExist)
     39    TEST_F(ScopeTest, ScopesDoNotExist)
    2440    {
    2541        EXPECT_FALSE(Scope<ScopeID::Root>::isActive());
     
    2743    }
    2844
    29     TEST(Scope, SingletonsDoNotExist)
     45    TEST_F(ScopeTest, SingletonsDoNotExist)
    3046    {
    3147        EXPECT_FALSE(TestSingletonRoot::exists());
     
    3349    }
    3450
    35     TEST(Scope, RootScope)
     51    TEST_F(ScopeTest, RootScope)
    3652    {
    3753        EXPECT_FALSE(Scope<ScopeID::Root>::isActive());
     
    4359    }
    4460
    45     TEST(DISABLED_Scope, RootAndGraphicsScope)
     61    TEST_F(ScopeTest, DISABLED_RootAndGraphicsScope)
    4662    {
    4763        EXPECT_FALSE(Scope<ScopeID::Graphics>::isActive());
     
    5874    }
    5975
    60     TEST(Scope, RootSingleton)
     76    TEST_F(ScopeTest, RootSingleton)
    6177    {
    6278        EXPECT_FALSE(TestSingletonRoot::exists());
     
    6884    }
    6985
    70     TEST(DISABLED_Scope, RootAndGraphicsSingleton)
     86    TEST_F(ScopeTest, DISABLED_RootAndGraphicsSingleton)
    7187    {
    7288        EXPECT_FALSE(TestSingletonGraphics::exists());
Note: See TracChangeset for help on using the changeset viewer.