Skip to content

Commit 2205ea6

Browse files
lbartolettinyalldawson
authored andcommittedJul 16, 2018
try to fix test for travis
1 parent 8edfaa7 commit 2205ea6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎tests/src/core/testqgscadutils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,22 +207,22 @@ void TestQgsCadUtils::testCommonAngle()
207207
// without common angle
208208
QgsCadUtils::AlignMapPointOutput res0 = QgsCadUtils::alignMapPoint( QgsPointXY( 40, 20.1 ), context );
209209
QVERIFY( res0.valid );
210-
QCOMPARE( res0.softLockCommonAngle, -1 );
210+
QCOMPARE( res0.softLockCommonAngle, -1.0 );
211211
QCOMPARE( res0.finalMapPoint, QgsPointXY( 40, 20.1 ) );
212212

213213
// common angle
214214
context.commonAngleConstraint = QgsCadUtils::AlignMapPointConstraint( true, false, 90 );
215215
QgsCadUtils::AlignMapPointOutput res1 = QgsCadUtils::alignMapPoint( QgsPointXY( 40, 20.1 ), context );
216216
QVERIFY( res1.valid );
217-
QCOMPARE( res1.softLockCommonAngle, 0 );
217+
QCOMPARE( res1.softLockCommonAngle, 0.0 );
218218
QCOMPARE( res1.finalMapPoint, QgsPointXY( 40, 20 ) );
219219

220220
// common angle + angle (make sure that angle constraint has priority)
221221
context.commonAngleConstraint = QgsCadUtils::AlignMapPointConstraint( true, false, 90 );
222222
context.angleConstraint = QgsCadUtils::AlignMapPointConstraint( true, false, 45 );
223223
QgsCadUtils::AlignMapPointOutput res2 = QgsCadUtils::alignMapPoint( QgsPointXY( 40, 20.1 ), context );
224224
QVERIFY( res2.valid );
225-
QCOMPARE( res2.softLockCommonAngle, -1 );
225+
QCOMPARE( res2.softLockCommonAngle, -1.0 );
226226
QCOMPARE( res2.finalMapPoint, QgsPointXY( 35.05, 25.05 ) );
227227

228228
// common angle rel
@@ -231,7 +231,7 @@ void TestQgsCadUtils::testCommonAngle()
231231
context.cadPointList[1] = QgsPointXY( 40, 20 );
232232
QgsCadUtils::AlignMapPointOutput res3 = QgsCadUtils::alignMapPoint( QgsPointXY( 50.1, 29.9 ), context );
233233
QVERIFY( res3.valid );
234-
QCOMPARE( res3.softLockCommonAngle, 90 );
234+
QCOMPARE( res3.softLockCommonAngle, 90.0 );
235235
QCOMPARE( res3.finalMapPoint, QgsPointXY( 50, 30 ) );
236236
}
237237

@@ -242,7 +242,7 @@ void TestQgsCadUtils::testDistance()
242242
// without distance constraint
243243
QgsCadUtils::AlignMapPointOutput res0 = QgsCadUtils::alignMapPoint( QgsPointXY( 45, 20 ), context );
244244
QVERIFY( res0.valid );
245-
QCOMPARE( res0.softLockCommonAngle, -1 );
245+
QCOMPARE( res0.softLockCommonAngle, -1.0 );
246246
QCOMPARE( res0.finalMapPoint, QgsPointXY( 45, 20 ) );
247247

248248
// dist

0 commit comments

Comments
 (0)
Please sign in to comment.