Detect if lconv contains thousands_sep

(cherry picked from commit 96c28f748d)
This commit is contained in:
Victor Zverovich authored and Jonathan Müller committed 2016-10-23 11:47:15 +02:00
1 parent 584fa85d18
commit ae85c91e80
2 files changed
+30 -18

No files matched your search

+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));
}