Skip to content

Commit

Permalink
Load dummy sound files in UI test fixture
Browse files Browse the repository at this point in the history
Also set SETTINGS.sound.effectsEnabled to false to prevent sounds from
trying to play.
  • Loading branch information
falbrechtskirchinger committed Jul 28, 2023
1 parent d550d2a commit 631e363
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/s25Main/UI/uiHelper/uiHelper/uiHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "uiHelpers.hpp"
#include "Loader.h"
#include "Settings.h"
#include "WindowManager.h"
#include "desktops/Desktop.h"
#include "drivers/VideoDriverWrapper.h"
Expand Down Expand Up @@ -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<DummyDesktop>());
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");
}

Expand Down

0 comments on commit 631e363

Please sign in to comment.