Skip to content
Permalink
Browse files
Fix test
  • Loading branch information
elpaso authored and nyalldawson committed Jun 21, 2021
1 parent 4ff0064 commit bbf5d11a86b34e0614c46fe6bb3e44279a921f49
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/src/core/testqgsexpression.cpp
@@ -3976,17 +3976,17 @@ class TestQgsExpression: public QObject
QCOMPARE( QgsExpression::formatPreviewString( t_uint ), QStringLiteral( "12,345" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_long ), QStringLiteral( "12,345" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_ulong ), QStringLiteral( "12,345" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_float ), QStringLiteral( "12,345.000977" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_double ), QStringLiteral( "12,345.001000" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_float ), QStringLiteral( "12,345.0009765625" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_double ), QStringLiteral( "12,345.001" ) );

QLocale().setDefault( QLocale::Italian );

QCOMPARE( QgsExpression::formatPreviewString( t_int ), QStringLiteral( "12.345" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_uint ), QStringLiteral( "12.345" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_long ), QStringLiteral( "12.345" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_ulong ), QStringLiteral( "12.345" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_float ), QStringLiteral( "12.345,000977" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_double ), QStringLiteral( "12.345,001000" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_float ), QStringLiteral( "12.345,0009765625" ) );
QCOMPARE( QgsExpression::formatPreviewString( t_double ), QStringLiteral( "12.345,001" ) );

QLocale().setDefault( QLocale::English );

0 comments on commit bbf5d11

Please sign in to comment.