1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Fix GameUI flag value regression introduced by a78659ed05

Added more strong unittests on that part to prevent future regression
This commit is contained in:
Loic Blot 2018-05-29 08:34:09 +02:00
parent 67ed56be3b
commit 75aa41c6de
No known key found for this signature in database
GPG key ID: EFAA458E8C153987
3 changed files with 11 additions and 4 deletions

View file

@ -48,9 +48,18 @@ void TestGameUI::runTests(IGameDef *gamedef)
void TestGameUI::testInit()
{
GameUI gui{};
// Ensure flags on GameUI init
UASSERT(gui.getFlags().show_chat)
UASSERT(gui.getFlags().show_hud)
UASSERT(!gui.getFlags().show_minimap)
UASSERT(!gui.getFlags().show_profiler_graph)
// And after the initFlags init stage
gui.initFlags();
UASSERT(gui.getFlags().show_chat)
UASSERT(gui.getFlags().show_hud)
UASSERT(!gui.getFlags().show_minimap)
UASSERT(!gui.getFlags().show_profiler_graph)
// @TODO verify if we can create non UI nulldevice to test this function
// gui.init();