From 631e3637ee5a6c6432daad97e97c05da3d5cf241 Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Fri, 28 Jul 2023 06:10:29 +0200 Subject: [PATCH] Load dummy sound files in UI test fixture Also set SETTINGS.sound.effectsEnabled to false to prevent sounds from trying to play. --- tests/s25Main/UI/uiHelper/uiHelper/uiHelpers.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/s25Main/UI/uiHelper/uiHelper/uiHelpers.cpp b/tests/s25Main/UI/uiHelper/uiHelper/uiHelpers.cpp index f019bd2f9..ca7acb080 100644 --- a/tests/s25Main/UI/uiHelper/uiHelper/uiHelpers.cpp +++ b/tests/s25Main/UI/uiHelper/uiHelper/uiHelpers.cpp @@ -4,6 +4,7 @@ #include "uiHelpers.hpp" #include "Loader.h" +#include "Settings.h" #include "WindowManager.h" #include "desktops/Desktop.h" #include "drivers/VideoDriverWrapper.h" @@ -31,12 +32,15 @@ void initGUITests() VIDEODRIVER.CreateScreen(VideoMode(800, 600), false); BOOST_TEST_CHECKPOINT("Load dummy files"); LOADER.LoadDummyGUIFiles(); + LOADER.LoadDummySoundFiles(); BOOST_TEST_CHECKPOINT("Switch to Desktop"); WINDOWMANAGER.Switch(std::make_unique()); BOOST_TEST_CHECKPOINT("Dummy Draw"); WINDOWMANAGER.Draw(); logAcc.clearLog(); } + // Don't try to play sounds + SETTINGS.sound.effectsEnabled = false; BOOST_TEST_CHECKPOINT("GUI test initialized"); }