Loading...
Searching...
No Matches
score-lib-state/Tests/Utils.hpp
1#pragma once
2
3#include <State/Message.hpp>
4
6
7#include <core/application/MinimalApplication.hpp>
8#include <core/application/MockApplication.hpp>
9
10#include <ossia/network/domain/domain.hpp>
11
12#include <QMetaType>
13#include <QObject>
14
15#include <catch2/reporters/catch_reporter_event_listener.hpp>
16#include <catch2/reporters/catch_reporter_registrars.hpp>
17
18namespace
19{
20struct ScoreTestApplicationStarter final : Catch::EventListenerBase
21{
22 using Catch::EventListenerBase::EventListenerBase;
23 void testRunStarting(const Catch::TestRunInfo&) override
24 {
25#if !defined(__EMSCRIPTEN__)
26 if(!qEnvironmentVariableIsSet("QT_QPA_PLATFORM"))
27 qputenv("QT_QPA_PLATFORM", "offscreen");
28#endif
30 }
31};
32}
33CATCH_REGISTER_LISTENER(ScoreTestApplicationStarter)
Definition MinimalApplication.hpp:23