diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-13 16:38:01 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-14 08:32:42 +0000 |
commit | f0a559f1c8dcf4b78c11853316919783823ded7a (patch) | |
tree | d5199ce97c70001b7db6cbba4082d8699c90abaf /tests/auto/corelib/tools/qalgorithms | |
parent | a2a00eb044596f3e3f628b6b20b38a5ba524915c (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/corelib/tools/qalgorithms')
-rwxr-xr-x | tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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")); } { |