summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_resource_without_obj_lib/main.cpp
blob: bffbf81b873e6bde7b513850bae010591c0f98a9 (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) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#include <QtCore/qtresource.h>
#include <QtTest/QtTest>

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"