File: tst_qquick3dloader.cpp

package info (click to toggle)
qt6-quick3d 6.10.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 143,588 kB
  • sloc: cpp: 395,989; ansic: 41,469; xml: 288; sh: 242; makefile: 32
file content (35 lines) | stat: -rw-r--r-- 864 bytes parent folder | download
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
29
30
31
32
33
34
35
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#include <private/qmlutils_p.h>

#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>

class tst_QQuick3DLoader : public QQmlDataTest
{
    Q_OBJECT
public:
    tst_QQuick3DLoader();

private slots:
    void boundComponent();
};

tst_QQuick3DLoader::tst_QQuick3DLoader()
    : QQmlDataTest(QT_QMLTEST_DATADIR, FailOnWarningsPolicy::FailOnWarnings)
{
}

void tst_QQuick3DLoader::boundComponent()
{
    QQmlEngine engine;
    QQmlComponent component(&engine, testFileUrl("boundComponent.qml"));
    QVERIFY2(component.isReady(), qPrintable(component.errorString()));
    QScopedPointer<QObject> o(component.create());
    QCOMPARE(o->objectName(), QStringLiteral("loaded"));
}

QTEST_MAIN(tst_QQuick3DLoader)

#include "tst_qquick3dloader.moc"