stringrenderer_test: Get system locale only once

This fixes a runtime exception on macOS.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2019-05-18 07:58:33 +02:00
parent 26c294940d
commit 4763f24cbb

View File

@ -50,8 +50,9 @@ using tesseract::StringRenderer;
class StringRendererTest : public ::testing::Test {
protected:
void SetUp() {
std::locale::global(std::locale(""));
void SetUp() override {
static std::locale system_locale("");
std::locale::global(system_locale);
}
static void SetUpTestCase() {