3#include <State/Message.hpp>
7#include <core/application/MinimalApplication.hpp>
8#include <core/application/MockApplication.hpp>
10#include <ossia/network/domain/domain.hpp>
15#include <catch2/reporters/catch_reporter_event_listener.hpp>
16#include <catch2/reporters/catch_reporter_registrars.hpp>
22struct ScoreTestApplicationStarter final : Catch::EventListenerBase
24 using Catch::EventListenerBase::EventListenerBase;
39 std::unique_ptr<score::MinimalApplication> app;
41 void testRunStarting(
const Catch::TestRunInfo&)
override
43#if !defined(__EMSCRIPTEN__)
44 if(!qEnvironmentVariableIsSet(
"QT_QPA_PLATFORM"))
45 qputenv(
"QT_QPA_PLATFORM",
"offscreen");
47 app = std::make_unique<score::MinimalApplication>();
50 void testRunEnded(
const Catch::TestRunStats&)
override { app.reset(); }
53CATCH_REGISTER_LISTENER(ScoreTestApplicationStarter)