Giuseppe D'Angelo cb84d80c8a Include <QTest>, not <QtTest>
Avoid module-wide inclusions for QtTest. The transitive inclusions
eat a considerable amount of compilation time.

Task-number: QTQAINFRA-7110
Pick-to: 6.8
Change-Id: Ic1c93b40b638ea5bff739be212f173457bae26aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 5e1a1787322ce20752fc5f5251364e4e3d211dca)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-04-14 21:32:29 +00:00

29 lines
649 B
C++

// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtCore/qtresource.h>
#include <QtTest/QTest>
class TestManualResourceInit : public QObject
{
Q_OBJECT
private slots:
void initTestCase();
void resourceExistsAfterManualInit();
};
void TestManualResourceInit::initTestCase()
{
// Manually initialize the resource like we used to do it in qt5 + qmake times.
Q_INIT_RESOURCE(helper_res);
}
void TestManualResourceInit::resourceExistsAfterManualInit()
{
QVERIFY(QFile::exists(":/resource.txt"));
}
QTEST_MAIN(TestManualResourceInit)
#include "main.moc"