diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-08-09 16:20:22 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-08-09 16:20:22 +0200 |
commit | 36990a732eab2dc16bee89715662f6d3d8b3a0cd (patch) | |
tree | d835ba67426e12e51dc1028e8ebac9087a3d43b0 /tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp | |
parent | cb37a1d0c3fce7951f5d7f1fb4a04f90e038f01b (diff) | |
parent | d1b72c98b4e617530bfb23c3a5b7ebc68c15c089 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I507e252f9cb11b75dd9f7f409c39d93094e8c3ef
Diffstat (limited to 'tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp')
-rw-r--r-- | tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp b/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp index 0f4bb5cdcc..41850d0263 100644 --- a/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp +++ b/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp @@ -82,6 +82,7 @@ private slots: void then_fulfilled_non_callable(); void then_reject_non_callable(); void then_resolve_multiple_then(); + void promiseChain(); private: void execute_test(QString testName); @@ -270,6 +271,20 @@ void tst_qqmlpromise::execute_test(QString testName) QTRY_COMPARE(object->property("wasTestSuccessful").toBool(), true); } +void tst_qqmlpromise::promiseChain() +{ + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("promisechain.qml")); + QVERIFY(component.isReady()); + QTest::ignoreMessage(QtDebugMsg, "1"); + QTest::ignoreMessage(QtDebugMsg, "2"); + QTest::ignoreMessage(QtDebugMsg, "3"); + QScopedPointer<QObject> root(component.create()); + QVERIFY(root); + QTRY_VERIFY(root->property("x") == 42); + +} + QTEST_MAIN(tst_qqmlpromise) |