Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/network/tests/test_Net.h
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | void wait(const std::vector<CNetClient*>& clients, size_t msecs) | ||||
} | } | ||||
} | } | ||||
void test_basic_DISABLED() | void test_basic_DISABLED() | ||||
{ | { | ||||
// This doesn't actually test much, it just runs a very quick multiplayer game | // This doesn't actually test much, it just runs a very quick multiplayer game | ||||
// and prints a load of debug output so you can see if anything funny's going on | // and prints a load of debug output so you can see if anything funny's going on | ||||
ScriptInterface scriptInterface("Engine", "Test", g_ScriptRuntime); | ScriptInterface scriptInterface("Engine", "Test", g_ScriptContext); | ||||
ScriptInterface::Request rq(scriptInterface); | ScriptInterface::Request rq(scriptInterface); | ||||
TestStdoutLogger logger; | TestStdoutLogger logger; | ||||
std::vector<CNetClient*> clients; | std::vector<CNetClient*> clients; | ||||
CGame client1Game(false); | CGame client1Game(false); | ||||
CGame client2Game(false); | CGame client2Game(false); | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | void test_basic_DISABLED() | ||||
client1Game.GetTurnManager()->Update(1.0f, 1); | client1Game.GetTurnManager()->Update(1.0f, 1); | ||||
client2Game.GetTurnManager()->Update(1.0f, 1); | client2Game.GetTurnManager()->Update(1.0f, 1); | ||||
client3Game.GetTurnManager()->Update(1.0f, 1); | client3Game.GetTurnManager()->Update(1.0f, 1); | ||||
wait(clients, 100); | wait(clients, 100); | ||||
} | } | ||||
void test_rejoin_DISABLED() | void test_rejoin_DISABLED() | ||||
{ | { | ||||
ScriptInterface scriptInterface("Engine", "Test", g_ScriptRuntime); | ScriptInterface scriptInterface("Engine", "Test", g_ScriptContext); | ||||
ScriptInterface::Request rq(scriptInterface); | ScriptInterface::Request rq(scriptInterface); | ||||
TestStdoutLogger logger; | TestStdoutLogger logger; | ||||
std::vector<CNetClient*> clients; | std::vector<CNetClient*> clients; | ||||
CGame client1Game(false); | CGame client1Game(false); | ||||
CGame client2Game(false); | CGame client2Game(false); | ||||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator