From 68bd4dad002705c2f7d54ffe95fe9355d262ae43 Mon Sep 17 00:00:00 2001 From: Johan Ouwerkerk Date: Mon, 21 Oct 2019 23:45:05 +0200 Subject: [PATCH] Fix failing tests due to inconsistencies in French number formatting --- autotests/validators/unsigned-long-validator.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autotests/validators/unsigned-long-validator.cpp b/autotests/validators/unsigned-long-validator.cpp index c136a8d..bc02c53 100644 --- a/autotests/validators/unsigned-long-validator.cpp +++ b/autotests/validators/unsigned-long-validator.cpp @@ -26,7 +26,12 @@ static QLocale frFR(QLocale::French, QLocale::France); static QLocale nlNL(QLocale::Dutch, QLocale::Netherlands); static QLocale enUK(QLocale::English, QLocale::UnitedKingdom); -static const QString french = QString::fromWCharArray(L"123\u00A0456"); +/* + * French is weird. + * Or at least the QLocale for France is definitely inconsistent. + * Sometimes you get 123\u00A0456, sometimes you get 123\202f\456... + */ +static const QString french = frFR.toString(123456ULL); static void define_valid_table(void) {