Skip to content

Commit

Permalink
stringrenderer_test: Get system locale only once
Browse files Browse the repository at this point in the history
This fixes a runtime exception on macOS.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed May 18, 2019
1 parent bb226c1 commit 639781b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions unittest/stringrenderer_test.cc
Expand Up @@ -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() {
Expand Down

0 comments on commit 639781b

Please sign in to comment.