Check if setlocale succeeded

This commit is contained in:
Victor Zverovich 2016-05-19 06:48:35 -07:00
parent 2d8a7ed086
commit 5b106083e7

View File

@ -1214,8 +1214,8 @@ TEST(FormatterTest, FormatIntLocale) {
#else
const char *locale = "English_United States";
#endif
std::setlocale(LC_ALL, locale);
EXPECT_EQ("1,234,567", format("{:n}", 1234567));
if (std::setlocale(LC_ALL, locale))
EXPECT_EQ("1,234,567", format("{:n}", 1234567));
}
TEST(FormatterTest, FormatFloat) {