| 1 |
// SPDX-FileCopyrightText: 2019 - 2026 UnionTech Software Technology Co., Ltd. |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 |
|
| 5 |
#include "gtest/gtest.h" |
| 6 |
|
| 7 |
#if defined(CMAKE_SAFETYTEST_ARG_ON) |
| 8 |
#include <sanitizer/asan_interface.h> |
| 9 |
#endif |
| 10 |
|
| 11 |
#include <DApplication> |
| 12 |
|
| 13 |
DWIDGET_USE_NAMESPACE |
| 14 |
|
| 15 |
int main(int argc, char **argv) |
| 16 |
{ |
| 17 |
qputenv("QT_QPA_PLATFORM", "offscreen"); |
| 18 |
DApplication application(argc, argv); |
| 19 |
::testing::InitGoogleTest(&argc, argv); |
| 20 |
int ret = RUN_ALL_TESTS(); |
| 21 |
|
| 22 |
#if defined(CMAKE_SAFETYTEST_ARG_ON) |
| 23 |
__sanitizer_set_report_path("asan.log"); |
| 24 |
#endif |
| 25 |
|
| 26 |
return ret; |
| 27 |
} |