• Home
  • Raw
  • Download

Lines Matching full:fmt

10 // {fmt} support for ranges, containers and types tuple interface.
12 #include "fmt/ranges.h"
27 auto ivf = fmt::format("{}", iv); in TEST()
33 auto ivf = fmt::format("{}", ivv); in TEST()
39 EXPECT_EQ("{(\"one\", 1), (\"two\", 2)}", fmt::format("{}", simap)); in TEST()
44 EXPECT_EQ("(42, 1.5)", fmt::format("{}", pa1)); in TEST()
50 EXPECT_EQ("(42, 1.5, \"this is tuple\", 'i')", fmt::format("{}", t)); in TEST()
51 EXPECT_EQ("()", fmt::format("{}", std::tuple<>())); in TEST()
57 EXPECT_EQ("(a, 1, 2)", fmt::format("({})", fmt::join(t1, ", "))); in TEST()
62 EXPECT_EQ("b + 4", fmt::format("{}", fmt::join(t2, " + "))); in TEST()
66 EXPECT_EQ("", fmt::format("{}", fmt::join(t3, "|"))); in TEST()
70 EXPECT_EQ("4", fmt::format("{}", fmt::join(t4, "/"))); in TEST()
74 EXPECT_EQ("1, 2, 3", fmt::format("{}", fmt::join({1, 2, 3}, ", "))); in TEST()
75 EXPECT_EQ("fmt rocks !", in TEST()
76 fmt::format("{}", fmt::join({"fmt", "rocks", "!"}, " "))); in TEST()
86 return fmt::string_view{str}; in get()
106 EXPECT_EQ("(13, \"my struct\")", fmt::format("{}", mst)); in TEST()
111 auto end = fmt::format_to(buf, "{}", std::vector{1, 2, 3}); in TEST()
124 EXPECT_FALSE((fmt::is_range<path_like, char>::value)); in TEST()
134 explicit operator fmt::string_view() const { return "foo"; } in operator fmt::string_view()
139 EXPECT_EQ("foo", fmt::format("{}", string_like())); in TEST()
156 EXPECT_EQ("{'h', 'e', 'l', 'l', 'o'}", fmt::format("{}", hello)); in TEST()
157 EXPECT_EQ("h_e_l_l_o", fmt::format("{}", fmt::join(hello, "_"))); in TEST()
160 // A range that provides non-const only begin()/end() to test fmt::join handles
182 EXPECT_EQ("0,0,0", fmt::format("{}", fmt::join(x, ","))); in TEST()
185 fmt::format("{}", fmt::join(non_const_only_range<int>(3u, 0), ","))); in TEST()
188 EXPECT_EQ("0,0,0", fmt::format("{}", fmt::join(y, ","))); in TEST()
190 fmt::format("{}", fmt::join(std::vector<int>(3u, 0), ","))); in TEST()
193 EXPECT_EQ("0,0,0", fmt::format("{}", fmt::join(z, ","))); in TEST()
200 EXPECT_FALSE((fmt::has_formatter<std::vector<unformattable>, in TEST()
201 fmt::format_context>::value)); in TEST()