[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [marble] tests: const'ify
From: Bernhard Beschow <bbeschow () cs ! tu-berlin ! de>
Date: 2016-10-16 16:07:18
Message-ID: E1bvny2-0006EZ-Gw () code ! kde ! org
[Download RAW message or body]
Git commit a60803b2bea03a3236231e3196e86637f1c7ea0d by Bernhard Beschow.
Committed on 16/10/2016 at 15:44.
Pushed by beschow into branch 'master'.
const'ify
(cherry picked from commit 87ad67c2c44f304a1229b4e5165b2e5dd35d302c)
M +15 -8 tests/TestGeoDataCopy.cpp
http://commits.kde.org/marble/a60803b2bea03a3236231e3196e86637f1c7ea0d
diff --git a/tests/TestGeoDataCopy.cpp b/tests/TestGeoDataCopy.cpp
index 3d7bff1..b2abee7 100644
--- a/tests/TestGeoDataCopy.cpp
+++ b/tests/TestGeoDataCopy.cpp
@@ -48,6 +48,10 @@ namespace Marble
class TestGeoDataCopy : public QObject
{
Q_OBJECT
+
+ public:
+ TestGeoDataCopy();
+
private:
void testCoordinate(GeoDataCoordinates coord, qreal alt, quint8 detail, \
QString coordtest ); private Q_SLOTS:
@@ -76,16 +80,24 @@ class TestGeoDataCopy : public QObject
void copyLineStyle();
void copyPolyStyle();
void copyStyleMap();
+
private:
+ const GeoDataCoordinates coord1;
+ const GeoDataCoordinates coord2;
+ const GeoDataCoordinates coord3;
QStringList coordString;
- GeoDataCoordinates coord1;
- GeoDataCoordinates coord2;
- GeoDataCoordinates coord3;
GeoDataPoint point1;
GeoDataPoint point2;
GeoDataPoint point3;
};
+TestGeoDataCopy::TestGeoDataCopy() :
+ coord1(13.7107, 51.0235, 123.4, GeoDataCoordinates::Degree, 2),
+ coord2(14.7107, 52.0235, 133.4, GeoDataCoordinates::Degree, 3),
+ coord3(15.7107, 53.0235, 143.4, GeoDataCoordinates::Degree, 4)
+{
+}
+
void TestGeoDataCopy::testCoordinate( GeoDataCoordinates coord, qreal alt, quint8 \
detail, QString coordtest ) {
QCOMPARE(coord.altitude(), alt);
@@ -103,15 +115,10 @@ void TestGeoDataCopy::initTestCase()
coordString << QString::fromUtf8(" 14\u00B0 42' 38,5\"E, 52\u00B0 01' 24,6\"N" \
);
coordString << QString::fromUtf8(" 15\u00B0 42' 38,5\"E, 53\u00B0 01' 24,6\"N" \
);
- coord1.set(13.7107,51.0235, 123.4, GeoDataCoordinates::Degree);
- coord1.setDetail(2);
testCoordinate(coord1, 123.4, 2, coordString[0]);
- coord2 = GeoDataCoordinates(14.7107, 52.0235, 133.4, GeoDataCoordinates::Degree, \
3); testCoordinate(coord2, 133.4, 3, coordString[1]);
- coord3.set(15.7107,53.0235, 143.4, GeoDataCoordinates::Degree);
- coord3.setDetail(4);
testCoordinate(coord3, 143.4, 4, coordString[2]);
point1.setCoordinates( GeoDataCoordinates(13.7107, 51.0235, 123.4, \
GeoDataCoordinates::Degree, 2) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic