From 37ca365469725d322f4a1b8b7ff569435a0a05d3 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Thu, 10 Dec 2015 15:55:45 -0800 Subject: [PATCH] [tests] Force classic locale on toString tests Fix an issue where the test result can be affected depending on the current locale settings of the machine running the tests. --- test/miscellaneous/variant.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/miscellaneous/variant.cpp b/test/miscellaneous/variant.cpp index c567c61e9..c55de3d27 100644 --- a/test/miscellaneous/variant.cpp +++ b/test/miscellaneous/variant.cpp @@ -7,6 +7,10 @@ using namespace mbgl; TEST(Variant, toString) { + // Force the default locale so we don't + // get results like "3,14" instead of "3.14". + std::locale::global(std::locale::classic()); + EXPECT_EQ("lord", toString( (std::string)"lord" )); EXPECT_EQ("36", toString( (uint64_t)36 )); EXPECT_EQ("-239", toString( (int64_t)-239 ));