aboutsummaryrefslogtreecommitdiff
path: root/cmake
Commit message (Expand)AuthorAge
* Add OGG_INCLUDE_DIR to SOUND_INCLUDE_DIRSPerttu Ahola2012-03-25
* celeron55's sound system initial frameworkPerttu Ahola2012-03-24
* Flatten share/ and user/ in the source and for the RUN_IN_PLACE buildPerttu Ahola2012-03-20
* Gettext fix for *BSD - require special linkage as glibc is not usedq662011-08-11
* Locale dir should be parallel to global data dirGiuseppe Bilotta2011-07-24
* Bring po update out of cmake againGiuseppe Bilotta2011-07-24
* updated cmakerules to autodetect if gettext can be usedConstantin Wenger2011-07-23
* updatepo cmake ruleGiuseppe Bilotta2011-07-22
* Refactor mo creation/installationGiuseppe Bilotta2011-07-22
* fixed not finding dll for gettext in MSVCConstantin Wenger2011-07-21
* Find correct library for MSVC vs MingW in WinowsGiuseppe Bilotta2011-07-21
* updated some path because the dlls are mostly under bin not libConstantin Wenger2011-07-21
* Refactor and clean up gettext managementGiuseppe Bilotta2011-07-21
* Use system sqlite3/jthread libs if availableGiuseppe Bilotta2011-07-20
* Added libIrrlicht.dll.a to searched library names for non-MSVC windowsPerttu Ahola2011-05-17
* forgot some test code in...Perttu Ahola2011-02-16
* Hopefully fixed some of the errors in cmake's finding of irrlichtPerttu Ahola2011-02-16
* might work good on cmake+msvc nowPerttu Ahola2011-02-15
* Hopefully fixed the problem of IRRLICHT_SOURCE_DIR being not considered when ...Perttu Ahola2011-02-01
* Mainly small build system fixesPerttu Ahola2011-01-09
* CMake stuff works now on linux and windows... and should be possible to make ...Perttu Ahola2011-01-08
* CMake working on Linux (not on windows)Perttu Ahola2011-01-08
ss="hl str">"fakespec", "fakespec"), true, Address(), true, nullptr) { } // clang-format on private: void SendChatMessage(session_t peer_id, const ChatMessage &message) { // NOOP } }; class TestServerShutdownState : public TestBase { public: TestServerShutdownState() { TestManager::registerTestModule(this); } const char *getName() { return "TestServerShutdownState"; } void runTests(IGameDef *gamedef); void testInit(); void testReset(); void testTrigger(); void testTick(); }; static TestServerShutdownState g_test_instance; void TestServerShutdownState::runTests(IGameDef *gamedef) { TEST(testInit); TEST(testReset); TEST(testTrigger); TEST(testTick); } void TestServerShutdownState::testInit() { Server::ShutdownState ss; UASSERT(!ss.is_requested); UASSERT(!ss.should_reconnect); UASSERT(ss.message.empty()); UASSERT(ss.m_timer == 0.0f); } void TestServerShutdownState::testReset() { Server::ShutdownState ss; ss.reset(); UASSERT(!ss.is_requested); UASSERT(!ss.should_reconnect); UASSERT(ss.message.empty()); UASSERT(ss.m_timer == 0.0f); } void TestServerShutdownState::testTrigger() { Server::ShutdownState ss; ss.trigger(3.0f, "testtrigger", true); UASSERT(!ss.is_requested); UASSERT(ss.should_reconnect); UASSERT(ss.message == "testtrigger"); UASSERT(ss.m_timer == 3.0f); } void TestServerShutdownState::testTick() { std::unique_ptr<FakeServer> fakeServer(new FakeServer()); Server::ShutdownState ss; ss.trigger(28.0f, "testtrigger", true); ss.tick(0.0f, fakeServer.get()); // Tick with no time should not change anything UASSERT(!ss.is_requested); UASSERT(ss.should_reconnect); UASSERT(ss.message == "testtrigger"); UASSERT(ss.m_timer == 28.0f); // Tick 2 seconds ss.tick(2.0f, fakeServer.get()); UASSERT(!ss.is_requested); UASSERT(ss.should_reconnect); UASSERT(ss.message == "testtrigger"); UASSERT(ss.m_timer == 26.0f); // Tick remaining seconds + additional expire ss.tick(26.1f, fakeServer.get()); UASSERT(ss.is_requested); UASSERT(ss.should_reconnect); UASSERT(ss.message == "testtrigger"); UASSERT(ss.m_timer == 0.0f); }