blob: fcb97ca4cdc783057aae40326fc0958cee47b757 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QtCore/QCoreApplication>
#include <QTest>
#include <private/qtestlog_p.h>
class tst_SilentFatal : public QObject
{
Q_OBJECT
private slots:
void fatalmessages();
};
void tst_SilentFatal::fatalmessages()
{
qFatal("This is a fatal error message that should still appear in silent test output");
}
QTEST_MAIN_WRAPPER(tst_SilentFatal,
std::vector<const char*> args(argv, argv + argc);
args.push_back("-silent");
args.push_back("-nocrashhandler");
argc = int(args.size());
argv = const_cast<char**>(&args[0]);
QTEST_MAIN_SETUP())
#include "tst_silent_fatal.moc"
|