1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Move hard coded minimap to builtin (#14071)

This commit is contained in:
cx384 2024-02-07 20:13:23 +01:00 committed by GitHub
parent f2b99332d9
commit adaa4cc2f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 51 additions and 87 deletions

View file

@ -30,7 +30,6 @@ public:
void runTests(IGameDef *gamedef);
void testInit();
void testFlagSetters();
void testInfoText();
void testStatusText();
};
@ -40,7 +39,6 @@ static TestGameUI g_test_instance;
void TestGameUI::runTests(IGameDef *gamedef)
{
TEST(testInit);
TEST(testFlagSetters);
TEST(testInfoText);
TEST(testStatusText);
}
@ -51,30 +49,18 @@ void TestGameUI::testInit()
// 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();
}
void TestGameUI::testFlagSetters()
{
GameUI gui{};
gui.showMinimap(true);
UASSERT(gui.getFlags().show_minimap);
gui.showMinimap(false);
UASSERT(!gui.getFlags().show_minimap);
}
void TestGameUI::testStatusText()
{
GameUI gui{};