aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking
ModeNameSize
-rw-r--r--approach.lua2910logplain
-rw-r--r--ars.lua4044logplain
-rw-r--r--database.lua19823logplain
-rw-r--r--demosignals.lua2656logplain
-rw-r--r--depends.txt32logplain
-rw-r--r--init.lua874logplain
d---------models46logplain
-rw-r--r--route_prog.lua17655logplain
-rw-r--r--route_ui.lua4652logplain
-rw-r--r--routesetting.lua11146logplain
-rw-r--r--logplain
-rw-r--r--tcb_ts_ui.lua24914logplain
d---------textures1168logplain
-rw-r--r--tool.lua1932logplain
-rw-r--r--train_sections.lua5317logplain
-rw-r--r--tsr_rail.lua1816logplain
pan>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); }