[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [marble] tests: don't compare level of detail values for GeoDataPlacemark::coordinate()
From:       Bernhard Beschow <bbeschow () cs ! tu-berlin ! de>
Date:       2016-10-16 16:07:18
Message-ID: E1bvny2-0006EZ-Mc () code ! kde ! org
[Download RAW message or body]

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 canonical 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 \
b1a507ba5d9e2386bc2dd4b2432569910a5e030e.

(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<GeoDataPlacemark*>(other.child(0))->coordinate(), coord3);
-    QCOMPARE(static_cast<GeoDataPlacemark*>(other.child(0))->coordinate().detail(), \
                coord3.detail());
     QCOMPARE(static_cast<GeoDataPlacemark*>(other.child(2))->coordinate(), coord1);
-    QCOMPARE(static_cast<GeoDataPlacemark*>(other.child(2))->coordinate().detail(), \
coord1.detail());  
     GeoDataFolder *otherFolder = static_cast<GeoDataFolder*>(other.child(1));
     QCOMPARE(static_cast<GeoDataPlacemark*>(otherFolder->child(0))->coordinate(), \
                coord1);
-    QCOMPARE(static_cast<GeoDataPlacemark*>(otherFolder->child(0))->coordinate().detail(), \
                coord1.detail());
     QCOMPARE(static_cast<GeoDataPlacemark*>(otherFolder->child(1))->coordinate(), \
                coord2);
-    QCOMPARE(static_cast<GeoDataPlacemark*>(otherFolder->child(1))->coordinate().detail(), \
                coord2.detail());
     QCOMPARE(static_cast<GeoDataPlacemark*>(otherFolder->child(2))->coordinate(), \
                coord3);
-    QCOMPARE(static_cast<GeoDataPlacemark*>(otherFolder->child(2))->coordinate().detail(), \
coord3.detail());  
     other.append(new GeoDataPlacemark(pl1));
 
     QCOMPARE(document.size(), 3);
     QCOMPARE(other.size(), 4);
     QCOMPARE(static_cast<GeoDataPlacemark*>(other.child(3))->coordinate(), coord1);
-    QCOMPARE(static_cast<GeoDataPlacemark*>(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<GeoDataPlacemark*>(other.child(0))->coordinate(), coord1);
-    QCOMPARE(static_cast<GeoDataPlacemark*>(other.child(0))->coordinate().detail(), \
                coord1.detail());
     QCOMPARE(static_cast<GeoDataPlacemark*>(other.child(1))->coordinate(), coord2);
-    QCOMPARE(static_cast<GeoDataPlacemark*>(other.child(1))->coordinate().detail(), \
                coord2.detail());
     QCOMPARE(static_cast<GeoDataPlacemark*>(other.child(2))->coordinate(), coord3);
-    QCOMPARE(static_cast<GeoDataPlacemark*>(other.child(2))->coordinate().detail(), \
coord3.detail());  
     other.append(new GeoDataPlacemark(pl1));
 
     QCOMPARE(folder.size(), 3);
     QCOMPARE(other.size(), 4);
     QCOMPARE(static_cast<GeoDataPlacemark*>(other.child(3))->coordinate(), coord1);
-    QCOMPARE(static_cast<GeoDataPlacemark*>(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<GeoDataPoint*>(placemark.geometry())->coordinates(), \
                coord1);
     QCOMPARE(static_cast<GeoDataPoint*>(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<GeoDataObject *>(0));
         QCOMPARE(other.coordinate(), coord1);
-        QCOMPARE(other.coordinate().detail(), coord1.detail());
         QCOMPARE(static_cast<GeoDataPoint*>(other.geometry())->coordinates(), \
                coord1);
         QCOMPARE(static_cast<GeoDataPoint*>(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<GeoDataPoint*>(other.geometry())->coordinates(), \
                coord1);
         QCOMPARE(static_cast<GeoDataPoint*>(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<GeoDataObject *>(0));
         QCOMPARE(other.coordinate(), coord1);
-        QCOMPARE(other.coordinate().detail(), coord1.detail());
         QCOMPARE(static_cast<GeoDataPoint*>(other.geometry())->coordinates(), \
                coord1);
         QCOMPARE(static_cast<GeoDataPoint*>(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<GeoDataPoint*>(other.geometry())->coordinates(), \
                coord1);
         QCOMPARE(static_cast<GeoDataPoint*>(other.geometry())->coordinates().detail(), \
coord1.detail());  QCOMPARE(other.area(), 12345678.0);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic