From f0a559f1c8dcf4b78c11853316919783823ded7a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 13 Oct 2015 16:38:01 +0200 Subject: Tests: Use QCOMPARE() with QLatin1String() for QString values. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prefer QCOMPARE over QVERIFY for equality and use QLatin1String(). Change-Id: If226a0fc7b25be3e6774c7e36ca1e6f99234e5dd Reviewed-by: Jędrzej Nowacki --- tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp') diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp index e1b494c9f1..6b27b4ffb6 100644 --- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp +++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp @@ -493,8 +493,8 @@ void tst_QFormLayout::addRow() QVERIFY(layout->itemAt(0, QFormLayout::LabelRole)->widget() == lbl1); QVERIFY(layout->itemAt(1, QFormLayout::LabelRole)->widget() == lbl2); - QVERIFY(layout->itemAt(2, QFormLayout::LabelRole)->widget()->property("text") == "Foo:"); - QVERIFY(layout->itemAt(3, QFormLayout::LabelRole)->widget()->property("text") == "Bar:"); + QCOMPARE(layout->itemAt(2, QFormLayout::LabelRole)->widget()->property("text").toString(), QLatin1String("Foo:")); + QCOMPARE(layout->itemAt(3, QFormLayout::LabelRole)->widget()->property("text").toString(), QLatin1String("Bar:")); QVERIFY(layout->itemAt(4, QFormLayout::LabelRole) == 0); QVERIFY(layout->itemAt(5, QFormLayout::LabelRole) == 0); -- cgit v1.2.3