summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-17 01:48:10 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-17 01:48:10 (GMT)
commit5212b98574194ee349d2444cc04f6f6f5b58ab5a (patch)
treec9d46e9bb84262d167dd63361291cf19210a02c9
parent0823d5a71d4c4591ae6e876539b9a248bdf00b8f (diff)
Use QLatin1String and QCOMPARE for raw string tests
-rw-r--r--tests/TestFeatureDetach.cpp8
-rw-r--r--tests/TestGeoDataCopy.cpp6
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/TestFeatureDetach.cpp b/tests/TestFeatureDetach.cpp
index 7912c42..20d471e 100644
--- a/tests/TestFeatureDetach.cpp
+++ b/tests/TestFeatureDetach.cpp
@@ -91,10 +91,10 @@ void TestFeatureDetach::testContainer()
GeoDataContainer cont2 = cont1;
cont2.child(0)->setName("Feat2");
- QVERIFY(cont1.child(0)->name() == "Feat1");
+ QCOMPARE(cont1.child(0)->name(), QLatin1String("Feat1"));
const GeoDataContainer cont3 = cont1;
- QVERIFY(cont3.child(0)->name() == "Feat1");
+ QCOMPARE(cont3.child(0)->name(), QLatin1String("Feat1"));
}
void TestFeatureDetach::testPlacemark()
@@ -123,10 +123,10 @@ void TestFeatureDetach::testTour()
GeoDataTour tour2 = tour1;
tour2.playlist()->setId("Playlist2");
- QVERIFY(tour1.playlist()->id() == "Playlist1");
+ QCOMPARE(tour1.playlist()->id(), QLatin1String("Playlist1"));
const GeoDataTour tour3 = tour1;
- QVERIFY(tour3.playlist()->id() == "Playlist1");
+ QCOMPARE(tour3.playlist()->id(), QLatin1String("Playlist1"));
}
void TestFeatureDetach::testGeometryParentInPlacemark()
diff --git a/tests/TestGeoDataCopy.cpp b/tests/TestGeoDataCopy.cpp
index be7ac3b..3d7bff1 100644
--- a/tests/TestGeoDataCopy.cpp
+++ b/tests/TestGeoDataCopy.cpp
@@ -681,7 +681,7 @@ void TestGeoDataCopy::copyStyleMap()
styleMap["poland"] = "pst3";
styleMap.setLastKey("poland");
- QVERIFY( styleMap.lastKey() == QString("poland") );
+ QCOMPARE(styleMap.lastKey(), QLatin1String("poland"));
GeoDataStyleMap testMap = styleMap;
@@ -692,8 +692,8 @@ void TestGeoDataCopy::copyStyleMap()
testMap.insert("Romania", "rst3");
testMap.setLastKey("Romania");
- QVERIFY( testMap.lastKey() == QString("Romania") );
- QVERIFY( styleMap.lastKey() == QString("poland") );
+ QCOMPARE(testMap.lastKey(), QLatin1String("Romania"));
+ QCOMPARE(styleMap.lastKey(), QLatin1String("poland"));
}
}