Loading...
Searching...
No Matches
score_integration.hpp
1#pragma once
2#include <core/application/MinimalApplication.hpp>
3
4#define SCORE_INTEGRATION_TEST(TestFun) \
5 \
6int main(int argc, char** argv) \
7{ \
8 QLocale::setDefault(QLocale::C); \
9 std::setlocale(LC_ALL, "C"); \
10 \
11 score::MinimalGUIApplication app(argc, argv); \
12 \
13 QMetaObject::invokeMethod(&app, [] { \
14 TestFun(); \
15 QApplication::processEvents(); \
16 qApp->exit(0); \
17 \
18 }, Qt::QueuedConnection); \
19 \
20 return app.exec(); \
21}
22
23
24#define SCORE_INTEGRATION_TEST_OBJECT(TestObject) \
25int main(int argc, char** argv) \
26{ \
27 TestObject tc(argc, argv); \
28 QTEST_SET_MAIN_SOURCE_PATH \
29 return QTest::qExec(&tc, argc, argv); \
30}
31