Skip to content
Permalink
Browse files

Fix test comparison

  • Loading branch information
elpaso committed Jun 9, 2018
1 parent a85f67e commit 85e34f2c929deface8fbc8b2edc0c9aae8d37802
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/src/core/testqgsfield.cpp
@@ -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" ) );

@@ -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 );

0 comments on commit 85e34f2

Please sign in to comment.
You can’t perform that action at this time.