Fix compilation with locales disabled (#1011)

This commit is contained in:
Victor Zverovich
2019-01-19 07:16:05 -08:00
parent dad1eec842
commit fdd8e333c1
3 changed files with 9 additions and 0 deletions

View File

@@ -50,6 +50,8 @@ std::string format_tm(const std::tm& time, const char* spec,
fmt::format(loc, "{:" spec "}", duration)); \
}
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
TEST(ChronoTest, FormatDefault) {
EXPECT_EQ("42s", fmt::format("{}", std::chrono::seconds(42)));
EXPECT_EQ("42as",
@@ -186,3 +188,5 @@ TEST(ChronoTest, Locale) {
EXPECT_TIME("%r", time, sec);
EXPECT_TIME("%p", time, sec);
}
#endif // FMT_STATIC_THOUSANDS_SEPARATOR