Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/test/core/class/OrxonoxClassTest.cc @ 11480

Last change on this file since 11480 was 11071, checked in by landauf, 9 years ago

merged branch cpp11_v3 back to trunk

  • Property svn:eol-style set to native
File size: 918 bytes
RevLine 
[9601]1#include <gtest/gtest.h>
2#include "core/class/OrxonoxClass.h"
[10624]3#include "core/class/IdentifierManager.h"
[9649]4#include "core/object/Context.h"
[9601]5
6namespace orxonox
7{
8    namespace
9    {
10        class TestClass : public OrxonoxClass
11        {
12        };
[9649]13
14        // Fixture
15        class OrxonoxClassTest : public ::testing::Test
16        {
17            public:
[11071]18                virtual void SetUp() override
[9649]19                {
[10624]20                    new IdentifierManager();
[11071]21                    Context::setRootContext(new Context(nullptr));
[9649]22                }
23
[11071]24                virtual void TearDown() override
[9649]25                {
[10624]26                    Context::destroyRootContext();
27                    delete &IdentifierManager::getInstance();
[9649]28                }
29        };
[9601]30    }
31
[9649]32    TEST_F(OrxonoxClassTest, CanCreate)
[9601]33    {
34        TestClass* test = new TestClass();
[11071]35        ASSERT_TRUE(test != nullptr);
[9601]36        delete test;
37    }
38}
Note: See TracBrowser for help on using the repository browser.