[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.
This commit is contained in:
Thiago Marcos P. Santos
2015-12-10 15:55:45 -08:00
parent 0ff9295ca8
commit 37ca365469

View File

@@ -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 ));