From 7a6a6ff9f83846b16a27275da16b5c5d3ad38ad9 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 27 Jun 2017 08:46:58 +1000 Subject: [PATCH] Fix test on Qt5.6 --- tests/src/core/testqgsprocessing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/core/testqgsprocessing.cpp b/tests/src/core/testqgsprocessing.cpp index fa8996017687..91b6bce4fa04 100644 --- a/tests/src/core/testqgsprocessing.cpp +++ b/tests/src/core/testqgsprocessing.cpp @@ -2377,7 +2377,7 @@ void TestQgsProcessing::parameterNumber() QCOMPARE( iNumber, 5 ); code = def->asScriptCode(); - QCOMPARE( code, QStringLiteral( "##optional=optional number 5.4" ) ); + QCOMPARE( code.left( 30 ), QStringLiteral( "##optional=optional number 5.4" ) ); // truncate code to 30, to avoid Qt 5.6 rounding issues fromCode.reset( dynamic_cast< QgsProcessingParameterNumber * >( QgsProcessingParameters::parameterFromScriptCode( code ) ) ); QVERIFY( fromCode.get() ); QCOMPARE( fromCode->name(), def->name() );