Skip to content

Commit e2e7e36

Browse files
committed
fix testqgis
1 parent fdce0ac commit e2e7e36

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/src/core/testqgis.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ void TestQGis::permissiveToDouble()
6868
QVERIFY( ok );
6969
QCOMPARE( result, 1000.0 );
7070
ok = false;
71-
result = QGis::permissiveToDouble( QString( "1%01000" ).arg( QLocale::system().groupSeparator() ), ok );
71+
result = QGis::permissiveToDouble( QString( "1" ) + QLocale::system().groupSeparator() + "000", ok );
7272
QVERIFY( ok );
7373
QCOMPARE( result, 1000.0 );
7474
ok = false;
75-
result = QGis::permissiveToDouble( QString( "5.5" ), ok );
75+
result = QGis::permissiveToDouble( QString( "5" ) + QLocale::system().decimalPoint() + "5", ok );
7676
QVERIFY( ok );
7777
QCOMPARE( result, 5.5 );
7878
ok = false;
79-
result = QGis::permissiveToDouble( QString( "1%01000.5" ).arg( QLocale::system().groupSeparator() ), ok );
79+
result = QGis::permissiveToDouble( QString( "1" ) + QLocale::system().groupSeparator() + "000" + QLocale::system().decimalPoint() + "5", ok );
8080
QVERIFY( ok );
8181
QCOMPARE( result, 1000.5 );
8282

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

8888
//messy input (invalid thousand separator position), should still be converted
8989
ok = false;
90-
result = QGis::permissiveToDouble( QString( "10%0100" ).arg( QLocale::system().groupSeparator() ), ok );
90+
result = QGis::permissiveToDouble( QString( "10" ) + QLocale::system().groupSeparator() + "00", ok );
9191
QVERIFY( ok );
9292
QCOMPARE( result, 1000.0 );
9393
ok = false;
94-
result = QGis::permissiveToDouble( QString( "10%0100.5" ).arg( QLocale::system().groupSeparator() ), ok );
94+
result = QGis::permissiveToDouble( QString( "10" ) + QLocale::system().groupSeparator() + "00" + QLocale::system().decimalPoint() + "5", ok );
9595
QVERIFY( ok );
9696
QCOMPARE( result, 1000.5 );
9797
}

0 commit comments

Comments
 (0)