Skip to content

Commit 14b6843

Browse files
committed
Update expected test results
1 parent 297dbe0 commit 14b6843

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

tests/src/app/testqgsattributetable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void TestQgsAttributeTable::testFieldCalculationArea()
160160
QgsFeatureIterator fit = tempLayer->dataProvider()->getFeatures();
161161
QgsFeature f;
162162
QVERIFY( fit.nextFeature( f ) );
163-
double expected = 1009089817.0;
163+
double expected = 1005721496.78008;
164164
QGSCOMPARENEAR( f.attribute( "col1" ).toDouble(), expected, 1.0 );
165165

166166
// change project area unit, check calculation respects unit
@@ -172,7 +172,7 @@ void TestQgsAttributeTable::testFieldCalculationArea()
172172
// check result
173173
fit = tempLayer->dataProvider()->getFeatures();
174174
QVERIFY( fit.nextFeature( f ) );
175-
expected = 389.6117565069;
175+
expected = 388.311240;
176176
QGSCOMPARENEAR( f.attribute( "col1" ).toDouble(), expected, 0.001 );
177177
}
178178

tests/src/app/testqgsfieldcalculator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void TestQgsFieldCalculator::testAreaCalculations()
164164
QgsFeatureIterator fit = tempLayer->dataProvider()->getFeatures();
165165
QgsFeature f;
166166
QVERIFY( fit.nextFeature( f ) );
167-
double expected = 1009089817.0;
167+
double expected = 1005721496.780080;
168168
QGSCOMPARENEAR( f.attribute( "col1" ).toDouble(), expected, 1.0 );
169169

170170
// change project area unit, check calculation respects unit
@@ -179,7 +179,7 @@ void TestQgsFieldCalculator::testAreaCalculations()
179179
// check result
180180
fit = tempLayer->dataProvider()->getFeatures();
181181
QVERIFY( fit.nextFeature( f ) );
182-
expected = 389.6117565069;
182+
expected = 388.311240;
183183
QGSCOMPARENEAR( f.attribute( "col1" ).toDouble(), expected, 0.001 );
184184
}
185185

tests/src/app/testqgsmaptoolidentifyaction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ void TestQgsMapToolIdentifyAction::areaCalculation()
449449
QCOMPARE( result.length(), 1 );
450450
QString derivedArea = result.at( 0 ).mDerivedAttributes[tr( "Area (Ellipsoidal, WGS84)" )];
451451
double area = derivedArea.remove( ',' ).split( ' ' ).at( 0 ).toDouble();
452-
QGSCOMPARENEAR( area, 1009089817.0, 1.0 );
452+
QGSCOMPARENEAR( area, 1005721496.780000, 1.0 );
453453
derivedArea = result.at( 0 ).mDerivedAttributes[tr( "Area (Cartesian)" )];
454454
area = derivedArea.remove( ',' ).split( ' ' ).at( 0 ).toDouble();
455455
QGSCOMPARENEAR( area, 1005640568.0, 1.0 );
@@ -460,7 +460,7 @@ void TestQgsMapToolIdentifyAction::areaCalculation()
460460
QCOMPARE( result.length(), 1 );
461461
derivedArea = result.at( 0 ).mDerivedAttributes[tr( "Area (Ellipsoidal, WGS84)" )];
462462
area = derivedArea.remove( ',' ).split( ' ' ).at( 0 ).toDouble();
463-
QGSCOMPARENEAR( area, 389.6117, 0.001 );
463+
QGSCOMPARENEAR( area, 388.311000, 0.001 );
464464
derivedArea = result.at( 0 ).mDerivedAttributes[tr( "Area (Cartesian)" )];
465465
area = derivedArea.remove( ',' ).split( ' ' ).at( 0 ).toDouble();
466466
QGSCOMPARENEAR( area, 388.280000, 0.001 );
@@ -472,7 +472,7 @@ void TestQgsMapToolIdentifyAction::areaCalculation()
472472
QCOMPARE( result.length(), 1 );
473473
derivedArea = result.at( 0 ).mDerivedAttributes[tr( "Area (Ellipsoidal, WGS84)" )];
474474
area = derivedArea.remove( ',' ).split( ' ' ).at( 0 ).toDouble();
475-
QGSCOMPARENEAR( area, 389.6117, 0.001 );
475+
QGSCOMPARENEAR( area, 388.311000, 0.001 );
476476
derivedArea = result.at( 0 ).mDerivedAttributes[tr( "Area (Cartesian)" )];
477477
area = derivedArea.remove( ',' ).split( ' ' ).at( 0 ).toDouble();
478478
QGSCOMPARENEAR( area, 388.280000, 0.001 );

tests/src/app/testqgsmeasuretool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void TestQgsMeasureTool::testAreaCalculation()
200200
// check result
201201
QString measureString = dlg->editTotal->text();
202202
double measured = measureString.remove( ',' ).split( ' ' ).at( 0 ).toDouble();
203-
double expected = 1009089817.0;
203+
double expected = 1005721496.780000;
204204
QGSCOMPARENEAR( measured, expected, 1.0 );
205205

206206
// change project area unit, check calculation respects unit
@@ -219,7 +219,7 @@ void TestQgsMeasureTool::testAreaCalculation()
219219
// check result
220220
measureString = dlg2->editTotal->text();
221221
measured = measureString.remove( ',' ).split( ' ' ).at( 0 ).toDouble();
222-
expected = 389.6117565069;
222+
expected = 388.311000;
223223
QGSCOMPARENEAR( measured, expected, 0.001 );
224224
}
225225

tests/src/core/testqgsexpression.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,7 @@ class TestQgsExpression: public QObject
22092209
QgsExpression expArea2( QStringLiteral( "$area" ) );
22102210
expArea2.setGeomCalculator( &da );
22112211
vArea = expArea2.evaluate( &context );
2212-
expected = 1009089817.0;
2212+
expected = 1005721496.780085;
22132213
QGSCOMPARENEAR( vArea.toDouble(), expected, 1.0 );
22142214
// test unit conversion
22152215
expArea2.setAreaUnits( QgsUnitTypes::AreaSquareMeters ); //default units should be square meters
@@ -2219,7 +2219,7 @@ class TestQgsExpression: public QObject
22192219
vArea = expArea2.evaluate( &context );
22202220
QGSCOMPARENEAR( vArea.toDouble(), expected, 1.0 );
22212221
expArea2.setAreaUnits( QgsUnitTypes::AreaSquareMiles );
2222-
expected = 389.6117565069;
2222+
expected = 388.311241;
22232223
vArea = expArea2.evaluate( &context );
22242224
QGSCOMPARENEAR( vArea.toDouble(), expected, 0.001 );
22252225

tests/src/python/test_qgsdistancearea.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,12 +551,12 @@ def testAreaMeasureAndUnits(self):
551551

552552
print(("measured {} in {}".format(area, QgsUnitTypes.toString(units))))
553553
# should always be in Meters Squared
554-
self.assertAlmostEqual(area, 37416879192.9, delta=0.1)
554+
self.assertAlmostEqual(area, 36918093794.121284, delta=0.1)
555555
self.assertEqual(units, QgsUnitTypes.AreaSquareMeters)
556556

557557
# test converting the resultant area
558558
area = da.convertAreaMeasurement(area, QgsUnitTypes.AreaSquareMiles)
559-
self.assertAlmostEqual(area, 14446.7378, delta=0.001)
559+
self.assertAlmostEqual(area, 14254.155703182701, delta=0.001)
560560

561561
# now try with a source CRS which is in feet
562562
polygon = QgsGeometry.fromPolygonXY(
@@ -582,12 +582,12 @@ def testAreaMeasureAndUnits(self):
582582
area = da.measureArea(polygon)
583583
units = da.areaUnits()
584584
print(("measured {} in {}".format(area, QgsUnitTypes.toString(units))))
585-
self.assertAlmostEqual(area, 184149.37, delta=1.0)
585+
self.assertAlmostEqual(area, 185818.59096575077, delta=1.0)
586586
self.assertEqual(units, QgsUnitTypes.AreaSquareMeters)
587587

588588
# test converting the resultant area
589589
area = da.convertAreaMeasurement(area, QgsUnitTypes.AreaSquareYards)
590-
self.assertAlmostEqual(area, 220240.8172549, delta=1.0)
590+
self.assertAlmostEqual(area, 222237.18521272976, delta=1.0)
591591

592592
def testFormatDistance(self):
593593
"""Test formatting distances"""

tests/src/python/test_qgsvectorlayer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,13 +1894,13 @@ def test_ExpressionFieldEllipsoidAreaCalculation(self):
18941894

18951895
# check value
18961896
f = next(temp_layer.getFeatures())
1897-
expected = 1009089817.0
1897+
expected = 1005721496.7800847
18981898
self.assertAlmostEqual(f['area'], expected, delta=1.0)
18991899

19001900
# change project area unit, check calculation respects unit
19011901
QgsProject.instance().setAreaUnits(QgsUnitTypes.AreaSquareMiles)
19021902
f = next(temp_layer.getFeatures())
1903-
expected = 389.6117565069
1903+
expected = 388.31124079933016
19041904
self.assertAlmostEqual(f['area'], expected, 3)
19051905

19061906
def test_ExpressionFilter(self):

0 commit comments

Comments
 (0)