Changeset 10624 for code/trunk/test/core/command
- Timestamp:
- Oct 4, 2015, 9:12:21 PM (10 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
code/trunk/test/core/command/CommandTest.cc
r9603 r10624 1 1 #include <gtest/gtest.h> 2 #include "core/command/ConsoleCommand.h" 2 #include "core/class/Identifier.h" 3 #include "core/class/IdentifierManager.h" 4 #include "core/command/ConsoleCommandIncludes.h" 3 5 #include "core/command/CommandExecutor.h" 4 6 #include "core/object/Destroyable.h" 7 #include "core/module/ModuleInstance.h" 5 8 6 9 namespace orxonox … … 130 133 ModifyConsoleCommand("test").popFunction(); 131 134 } 135 136 // Fixture 137 class CommandTest : public ::testing::Test 138 { 139 public: 140 virtual void SetUp() 141 { 142 new IdentifierManager(); 143 new ConsoleCommandManager(); 144 ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND); 145 Context::setRootContext(new Context(NULL)); 146 Identifier::initConfigValues_s = false; // TODO: hack! 147 IdentifierManager::getInstance().createClassHierarchy(); 148 } 149 150 virtual void TearDown() 151 { 152 IdentifierManager::getInstance().destroyClassHierarchy(); 153 Context::destroyRootContext(); 154 ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND); 155 delete &ConsoleCommandManager::getInstance(); 156 delete &IdentifierManager::getInstance(); 157 } 158 }; 132 159 } 133 160 … … 139 166 } 140 167 141 TEST (CommandTest, ModuleTest)168 TEST_F(CommandTest, ModuleTest) 142 169 { 143 170 test(0, 0, 0);
Note: See TracChangeset
for help on using the changeset viewer.