summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-12-10 15:55:45 -0800
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-12-10 18:25:51 -0800
commit37ca365469725d322f4a1b8b7ff569435a0a05d3 (patch)
tree785912d5259c58f163bc26a445be74526f5e65ba
parent0ff9295ca890114ee962897593f9774711a813f0 (diff)
downloadqtlocation-mapboxgl-37ca365469725d322f4a1b8b7ff569435a0a05d3.tar.gz
[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.
-rw-r--r--test/miscellaneous/variant.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/miscellaneous/variant.cpp b/test/miscellaneous/variant.cpp
index c567c61e90..c55de3d27f 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 ));