Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix testqgis
  • Loading branch information
jef-n committed Jul 1, 2015
1 parent fdce0ac commit e2e7e36
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/src/core/testqgis.cpp
Expand Up @@ -68,15 +68,15 @@ void TestQGis::permissiveToDouble()
QVERIFY( ok );
QCOMPARE( result, 1000.0 );
ok = false;
result = QGis::permissiveToDouble( QString( "1%01000" ).arg( QLocale::system().groupSeparator() ), ok );
result = QGis::permissiveToDouble( QString( "1" ) + QLocale::system().groupSeparator() + "000", ok );
QVERIFY( ok );
QCOMPARE( result, 1000.0 );
ok = false;
result = QGis::permissiveToDouble( QString( "5.5" ), ok );
result = QGis::permissiveToDouble( QString( "5" ) + QLocale::system().decimalPoint() + "5", ok );
QVERIFY( ok );
QCOMPARE( result, 5.5 );
ok = false;
result = QGis::permissiveToDouble( QString( "1%01000.5" ).arg( QLocale::system().groupSeparator() ), ok );
result = QGis::permissiveToDouble( QString( "1" ) + QLocale::system().groupSeparator() + "000" + QLocale::system().decimalPoint() + "5", ok );
QVERIFY( ok );
QCOMPARE( result, 1000.5 );

Expand All @@ -87,11 +87,11 @@ void TestQGis::permissiveToDouble()

//messy input (invalid thousand separator position), should still be converted
ok = false;
result = QGis::permissiveToDouble( QString( "10%0100" ).arg( QLocale::system().groupSeparator() ), ok );
result = QGis::permissiveToDouble( QString( "10" ) + QLocale::system().groupSeparator() + "00", ok );
QVERIFY( ok );
QCOMPARE( result, 1000.0 );
ok = false;
result = QGis::permissiveToDouble( QString( "10%0100.5" ).arg( QLocale::system().groupSeparator() ), ok );
result = QGis::permissiveToDouble( QString( "10" ) + QLocale::system().groupSeparator() + "00" + QLocale::system().decimalPoint() + "5", ok );
QVERIFY( ok );
QCOMPARE( result, 1000.5 );
}
Expand Down

0 comments on commit e2e7e36

Please sign in to comment.