diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-01-23 12:48:02 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-01-25 12:47:08 +0000 |
commit | bc36eb420e509cddc0faa27860666e80e2513e7e (patch) | |
tree | ed262d445a4d9f5d60766d144e5e283c986185db /tests | |
parent | c4f1a676fcaad76829c7cda1f5bea018150b7412 (diff) |
QQmlEngineDebugService: Output better diagnostics on test failure
Apparently this check fails sometimes. We want to know what kind of
value causes it to fail.
Task-number: QTBUG-65852
Change-Id: I732ee5e3b224567bf3ea34d57bef5d78bfdd6ca1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp index 57e95f7b89..dbefb3bab5 100644 --- a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp @@ -229,9 +229,13 @@ void tst_QQmlEngineDebugService::recursiveObjectTest( QCOMPARE(p.name, QString::fromUtf8(pmeta.name())); - if (pmeta.type() < QVariant::UserType && pmeta.userType() != - QMetaType::QVariant) // TODO test complex types - QCOMPARE(p.value , pmeta.read(o)); + // TODO test complex types + if (pmeta.type() < QVariant::UserType && pmeta.userType() != QMetaType::QVariant) { + const QVariant expected = pmeta.read(o); + QVERIFY2(p.value == expected, QString::fromLatin1("%1 != %2. Details: %3/%4/%5/%6") + .arg(QTest::toString(p.value)).arg(QTest::toString(expected)).arg(p.name) + .arg(p.valueTypeName).arg(pmeta.type()).arg(pmeta.userType()).toUtf8()); + } if (p.name == "parent") QVERIFY(p.valueTypeName == "QGraphicsObject*" || |