diff options
Diffstat (limited to 'tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp')
-rw-r--r-- | tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp index 1bd070c2d0..18ef7ac31d 100644 --- a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp +++ b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp @@ -433,12 +433,12 @@ void tst_qqmlcontext::idAsContextProperty() QVERIFY(obj); QVariant a = obj->property("a"); - QVERIFY(a.userType() == QMetaType::QObjectStar); + QCOMPARE(a.userType(), int(QMetaType::QObjectStar)); QVariant ctxt = qmlContext(obj)->contextProperty("myObject"); - QVERIFY(ctxt.userType() == QMetaType::QObjectStar); + QCOMPARE(ctxt.userType(), int(QMetaType::QObjectStar)); - QVERIFY(a == ctxt); + QCOMPARE(a, ctxt); delete obj; } @@ -455,20 +455,20 @@ void tst_qqmlcontext::readOnlyContexts() QQmlContext *context = qmlContext(obj); QVERIFY(context); - QVERIFY(qvariant_cast<QObject*>(context->contextProperty("me")) == obj); - QVERIFY(context->contextObject() == obj); + QCOMPARE(qvariant_cast<QObject*>(context->contextProperty("me")), obj); + QCOMPARE(context->contextObject(), obj); QTest::ignoreMessage(QtWarningMsg, "QQmlContext: Cannot set property on internal context."); context->setContextProperty("hello", 12); - QVERIFY(context->contextProperty("hello") == QVariant()); + QCOMPARE(context->contextProperty("hello"), QVariant()); QTest::ignoreMessage(QtWarningMsg, "QQmlContext: Cannot set property on internal context."); context->setContextProperty("hello", obj); - QVERIFY(context->contextProperty("hello") == QVariant()); + QCOMPARE(context->contextProperty("hello"), QVariant()); QTest::ignoreMessage(QtWarningMsg, "QQmlContext: Cannot set context object for internal context."); context->setContextObject(0); - QVERIFY(context->contextObject() == obj); + QCOMPARE(context->contextObject(), obj); delete obj; } |