Changeset 9649 for code/branches/core6/test/core/class
- Timestamp:
- Aug 14, 2013, 6:42:28 PM (11 years ago)
- Location:
- code/branches/core6/test/core/class
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/test/core/class/OrxonoxClassTest.cc
r9601 r9649 1 1 #include <gtest/gtest.h> 2 2 #include "core/class/OrxonoxClass.h" 3 #include "core/object/Context.h" 3 4 4 5 namespace orxonox … … 9 10 { 10 11 }; 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 }; 11 27 } 12 28 13 TEST (OrxonoxClassTest, CanCreate)29 TEST_F(OrxonoxClassTest, CanCreate) 14 30 { 15 31 TestClass* test = new TestClass(); -
code/branches/core6/test/core/class/OrxonoxInterfaceTest.cc
r9601 r9649 2 2 #include "core/class/OrxonoxInterface.h" 3 3 #include "core/class/OrxonoxClass.h" 4 #include "core/object/Context.h" 4 5 5 6 namespace orxonox … … 24 25 { 25 26 }; 27 28 // Fixture 29 class OrxonoxInterfaceTest : public ::testing::Test 30 { 31 public: 32 virtual void SetUp() 33 { 34 Context::setRootContext(new Context(NULL)); 35 } 36 37 virtual void TearDown() 38 { 39 Context::setRootContext(NULL); 40 } 41 }; 26 42 } 27 43 28 TEST (OrxonoxInterfaceTest, CanCreate1)44 TEST_F(OrxonoxInterfaceTest, CanCreate1) 29 45 { 30 46 TestClass1* test = new TestClass1(); … … 33 49 } 34 50 35 TEST (OrxonoxInterfaceTest, CanCreate2)51 TEST_F(OrxonoxInterfaceTest, CanCreate2) 36 52 { 37 53 TestClass2* test = new TestClass2(); -
code/branches/core6/test/core/class/SubclassIdentifierTest.cc
r9647 r9649 32 32 33 33 IdentifierManager::getInstance().createClassHierarchy(); 34 35 Context::setRootContext(new Context(NULL)); 34 36 } 35 37 36 38 virtual void TearDown() 37 39 { 40 Context::setRootContext(NULL); 41 38 42 IdentifierManager::getInstance().destroyAllIdentifiers(); 39 43 } -
code/branches/core6/test/core/class/SuperTest.cc
r9648 r9649 62 62 }; 63 63 64 64 // Fixture 65 65 class SuperTest : public ::testing::Test 66 66 { … … 76 76 77 77 IdentifierManager::getInstance().createClassHierarchy(); 78 79 Context::setRootContext(new Context(NULL)); 78 80 } 79 81 80 82 virtual void TearDown() 81 83 { 84 Context::setRootContext(NULL); 85 82 86 IdentifierManager::getInstance().destroyAllIdentifiers(); 83 87 }
Note: See TracChangeset
for help on using the changeset viewer.