aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-27 01:00:05 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-27 01:00:16 +0200
commit23dabcf4989d2ec34891e5df943d7998f9452fb4 (patch)
tree50a00da08df6f1f6fd781313828514e47bdeeafe /tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp
parent1da49d8493de7180a9db38d4614ba6fbbe898276 (diff)
parent1c06ff9cac74964f60615d040f013d8eb852e17d (diff)
Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"
Diffstat (limited to 'tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp')
-rw-r--r--tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp b/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp
index 41850d0263..b430434526 100644
--- a/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp
+++ b/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp
@@ -83,6 +83,7 @@ private slots:
void then_reject_non_callable();
void then_resolve_multiple_then();
void promiseChain();
+ void promiseHandlerThrows();
private:
void execute_test(QString testName);
@@ -285,6 +286,17 @@ void tst_qqmlpromise::promiseChain()
}
+void tst_qqmlpromise::promiseHandlerThrows()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, testFileUrl("promisehandlerthrows.qml"));
+ QVERIFY(component.isReady());
+ QTest::ignoreMessage(QtDebugMsg, "Rethrowing err");
+ QScopedPointer<QObject> root(component.create());
+ QVERIFY(root);
+ QTRY_VERIFY(root->property("errorMessage") == QLatin1String("Some error"));
+}
+
QTEST_MAIN(tst_qqmlpromise)