Git commit 882d42a3e9bb74edb02cc709413a6182ffce51c7 by Bernhard Beschow. Committed on 16/10/2016 at 16:06. Pushed by beschow into branch 'master'. don't compare level of detail values for GeoDataPlacemark::coordinate() GeoDataPlacemark::coordinate() returns some more or less arbitrary canonica= l value for geometries (what is the lon,lat pair of a polygon, after all?).= Therefore, the LOD value shall not be of interest. This commit fixes the GeoDataCopy test, which failed since commit b1a507ba5= d9e2386bc2dd4b2432569910a5e030e. (cherry picked from commit ddd7414f1d37afe04156493d28e0c68445d51524) M +0 -15 tests/TestGeoDataCopy.cpp http://commits.kde.org/marble/882d42a3e9bb74edb02cc709413a6182ffce51c7 diff --git a/tests/TestGeoDataCopy.cpp b/tests/TestGeoDataCopy.cpp index 629a73b..2e6e130 100644 --- a/tests/TestGeoDataCopy.cpp +++ b/tests/TestGeoDataCopy.cpp @@ -336,24 +336,18 @@ void TestGeoDataCopy::copyDocument() QCOMPARE(other.size(), 3); = QCOMPARE(static_cast(other.child(0))->coordinate(),= coord3); - QCOMPARE(static_cast(other.child(0))->coordinate().= detail(), coord3.detail()); QCOMPARE(static_cast(other.child(2))->coordinate(),= coord1); - QCOMPARE(static_cast(other.child(2))->coordinate().= detail(), coord1.detail()); = GeoDataFolder *otherFolder =3D static_cast(other.child= (1)); QCOMPARE(static_cast(otherFolder->child(0))->coordi= nate(), coord1); - QCOMPARE(static_cast(otherFolder->child(0))->coordi= nate().detail(), coord1.detail()); QCOMPARE(static_cast(otherFolder->child(1))->coordi= nate(), coord2); - QCOMPARE(static_cast(otherFolder->child(1))->coordi= nate().detail(), coord2.detail()); QCOMPARE(static_cast(otherFolder->child(2))->coordi= nate(), coord3); - QCOMPARE(static_cast(otherFolder->child(2))->coordi= nate().detail(), coord3.detail()); = other.append(new GeoDataPlacemark(pl1)); = QCOMPARE(document.size(), 3); QCOMPARE(other.size(), 4); QCOMPARE(static_cast(other.child(3))->coordinate(),= coord1); - QCOMPARE(static_cast(other.child(3))->coordinate().= detail(), coord1.detail()); } = void TestGeoDataCopy::copyFolder() @@ -382,18 +376,14 @@ void TestGeoDataCopy::copyFolder() QEXPECT_FAIL("", "FIXME", Continue); QCOMPARE(other.child(2)->parent(), &other); QCOMPARE(static_cast(other.child(0))->coordinate(),= coord1); - QCOMPARE(static_cast(other.child(0))->coordinate().= detail(), coord1.detail()); QCOMPARE(static_cast(other.child(1))->coordinate(),= coord2); - QCOMPARE(static_cast(other.child(1))->coordinate().= detail(), coord2.detail()); QCOMPARE(static_cast(other.child(2))->coordinate(),= coord3); - QCOMPARE(static_cast(other.child(2))->coordinate().= detail(), coord3.detail()); = other.append(new GeoDataPlacemark(pl1)); = QCOMPARE(folder.size(), 3); QCOMPARE(other.size(), 4); QCOMPARE(static_cast(other.child(3))->coordinate(),= coord1); - QCOMPARE(static_cast(other.child(3))->coordinate().= detail(), coord1.detail()); } = void TestGeoDataCopy::copyPlacemark() @@ -416,7 +406,6 @@ void TestGeoDataCopy::copyPlacemark() placemark.setParent(&folder); = QCOMPARE(placemark.coordinate(), coord1); - QCOMPARE(placemark.coordinate().detail(), coord1.detail()); QCOMPARE(static_cast(placemark.geometry())->coordinates= (), coord1); QCOMPARE(static_cast(placemark.geometry())->coordinates= ().detail(), coord1.detail()); QCOMPARE(placemark.area(), 12345678.0); @@ -432,7 +421,6 @@ void TestGeoDataCopy::copyPlacemark() QCOMPARE(other.id(), QString()); QCOMPARE(other.parent(), static_cast(0)); QCOMPARE(other.coordinate(), coord1); - QCOMPARE(other.coordinate().detail(), coord1.detail()); QCOMPARE(static_cast(other.geometry())->coordinates= (), coord1); QCOMPARE(static_cast(other.geometry())->coordinates= ().detail(), coord1.detail()); QCOMPARE(other.area(), 12345678.0); @@ -443,7 +431,6 @@ void TestGeoDataCopy::copyPlacemark() other.setPopulation(987654321); = QCOMPARE(other.coordinate(), coord1); - QCOMPARE(other.coordinate().detail(), coord1.detail()); QCOMPARE(static_cast(other.geometry())->coordinates= (), coord1); QCOMPARE(static_cast(other.geometry())->coordinates= ().detail(), coord1.detail()); QCOMPARE(other.area(), 12345678.0); @@ -463,7 +450,6 @@ void TestGeoDataCopy::copyPlacemark() QCOMPARE(other.id(), QString()); QCOMPARE(other.parent(), static_cast(0)); QCOMPARE(other.coordinate(), coord1); - QCOMPARE(other.coordinate().detail(), coord1.detail()); QCOMPARE(static_cast(other.geometry())->coordinates= (), coord1); QCOMPARE(static_cast(other.geometry())->coordinates= ().detail(), coord1.detail()); QCOMPARE(other.area(), 12345678.0); @@ -474,7 +460,6 @@ void TestGeoDataCopy::copyPlacemark() other.setPopulation(987654321); = QCOMPARE(other.coordinate(), coord1); - QCOMPARE(other.coordinate().detail(), coord1.detail()); QCOMPARE(static_cast(other.geometry())->coordinates= (), coord1); QCOMPARE(static_cast(other.geometry())->coordinates= ().detail(), coord1.detail()); QCOMPARE(other.area(), 12345678.0);