Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/components/tests/test_CommandQueue.h
Show All 28 Lines | public: | ||||
void tearDown() | void tearDown() | ||||
{ | { | ||||
CXeromyces::Terminate(); | CXeromyces::Terminate(); | ||||
} | } | ||||
void test_basic() | void test_basic() | ||||
{ | { | ||||
ComponentTestHelper test(g_ScriptRuntime); | ComponentTestHelper test(g_ScriptContext); | ||||
ScriptInterface::Request rq(test.GetScriptInterface()); | ScriptInterface::Request rq(test.GetScriptInterface()); | ||||
std::vector<SimulationCommand> empty; | std::vector<SimulationCommand> empty; | ||||
ICmpCommandQueue* cmp = test.Add<ICmpCommandQueue>(CID_CommandQueue, "", SYSTEM_ENTITY); | ICmpCommandQueue* cmp = test.Add<ICmpCommandQueue>(CID_CommandQueue, "", SYSTEM_ENTITY); | ||||
TS_ASSERT(test.GetScriptInterface().Eval("var cmds = []; function ProcessCommand(player, cmd) { cmds.push([player, cmd]); }")); | TS_ASSERT(test.GetScriptInterface().Eval("var cmds = []; function ProcessCommand(player, cmd) { cmds.push([player, cmd]); }")); | ||||
Show All 29 Lines |
Wildfire Games · Phabricator