From ca2803922d42312fed856df1e911fea588474960 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 5 Apr 2023 13:32:58 +0200 Subject: [PATCH] Use current locale for the benchmarks The just added wxString::ToDouble() benchmark is locale-dependent, so allow using the current locale for the tests. --- tests/benchmarks/bench.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/benchmarks/bench.cpp b/tests/benchmarks/bench.cpp index 70807914de..b5c5f41f7e 100644 --- a/tests/benchmarks/bench.cpp +++ b/tests/benchmarks/bench.cpp @@ -20,6 +20,7 @@ #include "wx/app.h" #include "wx/cmdline.h" #include "wx/stopwatch.h" +#include "wx/uilocale.h" #if wxUSE_GUI #include "wx/frame.h" @@ -117,6 +118,9 @@ bool BenchApp::OnInit() if ( !BenchAppBase::OnInit() ) return false; + // Some benchmarks are locale-sensitive, so use the current locale. + wxUILocale::UseDefault(); + wxPrintf("wxWidgets benchmarking program\n" "Build: %s\n", WX_BUILD_OPTIONS_SIGNATURE);