summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-13 16:38:01 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-14 08:32:42 +0000
commitf0a559f1c8dcf4b78c11853316919783823ded7a (patch)
treed5199ce97c70001b7db6cbba4082d8699c90abaf /tests/auto/widgets/kernel
parenta2a00eb044596f3e3f628b6b20b38a5ba524915c (diff)
Tests: Use QCOMPARE() with QLatin1String() for QString values.
Prefer QCOMPARE over QVERIFY for equality and use QLatin1String(). Change-Id: If226a0fc7b25be3e6774c7e36ca1e6f99234e5dd Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets/kernel')
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp4
1 files changed, 2 insertions, 2 deletions
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);