summaryrefslogtreecommitdiff
path: root/src/unittest
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2018-05-29 08:34:09 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2018-05-29 08:34:09 +0200
commit75aa41c6de121f01d17cfb8f90916736496b2dce (patch)
tree822de326a329faea2ccd9bbb1750ff328e5d9fd3 /src/unittest
parent67ed56be3b5cc674ee9d42ccef409952b5e0c362 (diff)
downloadminetest-75aa41c6de121f01d17cfb8f90916736496b2dce.tar.gz
minetest-75aa41c6de121f01d17cfb8f90916736496b2dce.tar.bz2
minetest-75aa41c6de121f01d17cfb8f90916736496b2dce.zip
Fix GameUI flag value regression introduced by a78659ed0529226ad937f5e241ad72ba93702959
Added more strong unittests on that part to prevent future regression
Diffstat (limited to 'src/unittest')
-rw-r--r--src/unittest/test_gameui.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/unittest/test_gameui.cpp b/src/unittest/test_gameui.cpp
index 9bc9d8cf5..d7fb622be 100644
--- a/src/unittest/test_gameui.cpp
+++ b/src/unittest/test_gameui.cpp
@@ -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();