Extract wxLocaleSetter from the tests into a private header

This will allow using this class in the library code too.

No real changes yet, this is a pure refactoring.

This commit is best viewed using git --color-moved option.
This commit is contained in:
Vadim Zeitlin
2021-08-03 01:14:24 +02:00
parent ebec1ff9f6
commit a4940bf696
7 changed files with 64 additions and 38 deletions

View File

@@ -22,6 +22,8 @@
#include "wx/stdpaths.h"
#include "wx/scopeguard.h"
#include "wx/private/localeset.h"
#ifdef __WINDOWS__
#include "wx/msw/registry.h"
#include "wx/msw/wrapshl.h"
@@ -493,7 +495,7 @@ TEST_CASE("wxFileName::GetHumanReadable", "[filename]")
{ "304 KB", 304351, 0, wxSIZE_CONV_SI },
};
CLocaleSetter loc; // we want to use "C" locale for LC_NUMERIC
wxCLocaleSetter loc; // we want to use "C" locale for LC_NUMERIC
// so that regardless of the system's locale
// the decimal point used by GetHumanReadableSize()
// is always '.'