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 --- .../corelib/tools/qalgorithms/tst_qalgorithms.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/auto/corelib/tools/qalgorithms') diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp index 99e5c4c85d..105b8b45d8 100755 --- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp +++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp @@ -312,24 +312,24 @@ void tst_QAlgorithms::swap() { QString a = "1", b = "2"; qSwap(a, b); - QVERIFY(a == "2"); - QVERIFY(b == "1"); + QCOMPARE(a, QLatin1String("2")); + QCOMPARE(b, QLatin1String("1")); qSwap(a, a); - QVERIFY(a == "2"); - QVERIFY(b == "1"); + QCOMPARE(a, QLatin1String("2")); + QCOMPARE(b, QLatin1String("1")); qSwap(b, b); - QVERIFY(a == "2"); - QVERIFY(b == "1"); + QCOMPARE(a, QLatin1String("2")); + QCOMPARE(b, QLatin1String("1")); qSwap(a, b); - QVERIFY(a == "1"); - QVERIFY(b == "2"); + QCOMPARE(a, QLatin1String("1")); + QCOMPARE(b, QLatin1String("2")); qSwap(b, a); - QVERIFY(a == "2"); - QVERIFY(b == "1"); + QCOMPARE(a, QLatin1String("2")); + QCOMPARE(b, QLatin1String("1")); } { -- cgit v1.2.3