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:
parent
67ed56be3b
commit
75aa41c6de
3 changed files with 11 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue