diff --git a/src/tint/writer/float_to_string_test.cc b/src/tint/writer/float_to_string_test.cc index 901334e4e7..643f070de0 100644 --- a/src/tint/writer/float_to_string_test.cc +++ b/src/tint/writer/float_to_string_test.cc @@ -17,6 +17,7 @@ #include #include #include +#include #include "gtest/gtest.h" #include "src/tint/utils/bitcast.h" @@ -79,6 +80,16 @@ TEST(FloatToStringTest, Precision) { EXPECT_EQ(FloatToString(1e-20f), "9.99999968e-21"); } +#if !defined(__linux__) +TEST(FloatToStringTest, Locale) { + std::locale::global(std::locale("sv_SE.UTF-8")); + + EXPECT_EQ(FloatToString(1e-9f), "0.000000001"); + + std::locale::global(std::locale::classic()); +} +#endif // !defined(__linux__) + //////////////////////////////////////////////////////////////////////////////// // FloatToBitPreservingString // ////////////////////////////////////////////////////////////////////////////////