Skip to content

Commit

Permalink
Fix test comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Jun 9, 2018
1 parent a85f67e commit 85e34f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/core/testqgsfield.cpp
Expand Up @@ -333,7 +333,6 @@ void TestQgsField::displayString()
QgsField doubleFieldNoPrec( QStringLiteral( "double" ), QVariant::Double, QStringLiteral( "double" ), 10 );
QCOMPARE( doubleFieldNoPrec.displayString( 5.005005 ), QString( "5.005005" ) );
QCOMPARE( doubleFieldNoPrec.displayString( 5.005005005 ), QString( "5.005005005" ) );
QCOMPARE( QLocale().decimalPoint(), '.' );
QCOMPARE( QLocale().numberOptions() & QLocale::NumberOption::OmitGroupSeparator, QLocale::NumberOption::DefaultNumberOptions );
QCOMPARE( doubleFieldNoPrec.displayString( 599999898999.0 ), QString( "599,999,898,999" ) );

Expand Down Expand Up @@ -514,7 +513,8 @@ void TestQgsField::convertCompatible()
QCOMPARE( stringVar.type(), QVariant::String );
QCOMPARE( stringVar.toString(), QString( "lon" ) );

//double with ',' as decimal separator
//double with ',' as decimal separator for German locale
QLocale::setDefault( QLocale::German );
QVariant doubleCommaVar( "1,2345" );
QVERIFY( doubleField.convertCompatible( doubleCommaVar ) );
QCOMPARE( doubleCommaVar.type(), QVariant::Double );
Expand Down

0 comments on commit 85e34f2

Please sign in to comment.