Detect if lconv contains thousands_sep

This commit is contained in:
Victor Zverovich
2016-05-23 07:41:22 -07:00
parent e160c2b79a
commit 96c28f748d
2 changed files with 30 additions and 18 deletions
+14
View File
@@ -956,3 +956,17 @@ TEST(UtilTest, Conditional) {
fmt::internal::Conditional<false, int, char>::type *pc = &c;
(void)pc;
}
struct TestLConv {
char *thousands_sep;
};
struct EmptyLConv {};
TEST(UtilTest, ThousandsSep) {
char foo[] = "foo";
TestLConv lc = {foo};
EXPECT_EQ("foo", fmt::internal::thousands_sep(&lc).to_string());
EmptyLConv empty_lc;
EXPECT_EQ("", fmt::internal::thousands_sep(&empty_lc));
}