Skip to content

Commit 7a6a6ff

Browse files
committed
Fix test on Qt5.6
1 parent 86d33c1 commit 7a6a6ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/src/core/testqgsprocessing.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2377,7 +2377,7 @@ void TestQgsProcessing::parameterNumber()
23772377
QCOMPARE( iNumber, 5 );
23782378

23792379
code = def->asScriptCode();
2380-
QCOMPARE( code, QStringLiteral( "##optional=optional number 5.4" ) );
2380+
QCOMPARE( code.left( 30 ), QStringLiteral( "##optional=optional number 5.4" ) ); // truncate code to 30, to avoid Qt 5.6 rounding issues
23812381
fromCode.reset( dynamic_cast< QgsProcessingParameterNumber * >( QgsProcessingParameters::parameterFromScriptCode( code ) ) );
23822382
QVERIFY( fromCode.get() );
23832383
QCOMPARE( fromCode->name(), def->name() );

0 commit comments

Comments
 (0)