• Home
  • Raw
  • Download

Lines Matching full:fmt

11 // Check that fmt/compile.h compiles with windows.h included before it.
16 #include "fmt/compile.h"
26 typedef fmt::detail::compiled_format_base<decltype(format)> provider; in check_prepared_parts_type()
27 typedef fmt::detail::format_part<char> in check_prepared_parts_type()
53 const auto prepared = fmt::detail::compile<int>("test {}"); in TEST()
54 EXPECT_EQ("test 42", fmt::format(prepared, 42)); in TEST()
55 const auto wprepared = fmt::detail::compile<int>(L"test {}"); in TEST()
56 EXPECT_EQ(L"test 42", fmt::format(wprepared, 42)); in TEST()
61 const auto prepared = fmt::detail::compile<int>("4{}"); in TEST()
62 fmt::format_to(fmt::detail::make_checked(buffer, 32), prepared, 2); in TEST()
65 const auto wprepared = fmt::detail::compile<int>(L"4{}"); in TEST()
66 fmt::format_to(fmt::detail::make_checked(wbuffer, 32), wprepared, 2); in TEST()
72 const auto prepared = fmt::detail::compile<int>("4{}"); in TEST()
73 fmt::format_to(s.begin(), prepared, 2); in TEST()
76 const auto wprepared = fmt::detail::compile<int>(L"4{}"); in TEST()
77 fmt::format_to(ws.begin(), wprepared, 2); in TEST()
83 auto f = fmt::detail::compile<int>("{:10}"); in TEST()
84 auto result = fmt::format_to_n(buf, 5, f, 42); in TEST()
87 EXPECT_EQ(fmt::string_view(buf, 5), " "); in TEST()
91 auto f = fmt::detail::compile<int>("{:10}"); in TEST()
92 EXPECT_EQ(fmt::formatted_size(f, 42), 10); in TEST()
96 auto f = fmt::detail::compile<int, int>("{} {}"); in TEST()
97 EXPECT_EQ(fmt::format(f, 42, 42), "42 42"); in TEST()
112 auto f = fmt::detail::compile<test_formattable>("{}"); in TEST()
113 EXPECT_EQ(fmt::format(f, test_formattable()), "foo"); in TEST()
117 auto f = fmt::detail::compile<>(""); in TEST()
118 EXPECT_EQ(fmt::format(f), ""); in TEST()
123 EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), 42)); in TEST()
124 EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), 42u)); in TEST()
125 EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), 42ll)); in TEST()
126 EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), 42ull)); in TEST()
127 EXPECT_EQ("true", fmt::format(FMT_COMPILE("{}"), true)); in TEST()
128 EXPECT_EQ("x", fmt::format(FMT_COMPILE("{}"), 'x')); in TEST()
129 EXPECT_EQ("4.2", fmt::format(FMT_COMPILE("{}"), 4.2)); in TEST()
130 EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), "foo")); in TEST()
131 EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), std::string("foo"))); in TEST()
132 EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), test_formattable())); in TEST()
136 EXPECT_EQ(L"42", fmt::format(FMT_COMPILE(L"{}"), 42)); in TEST()
140 EXPECT_EQ("42", fmt::format(FMT_COMPILE("{:x}"), 0x42)); in TEST()
145 fmt::format(FMT_COMPILE("{:{}}{:{}}"), 42, 4, "foo", 5)); in TEST()
150 auto end = fmt::format_to(buf, FMT_COMPILE("{}"), 42); in TEST()
153 end = fmt::format_to(buf, FMT_COMPILE("{:x}"), 42); in TEST()
161 auto res = fmt::format_to_n(buffer, buffer_size, FMT_COMPILE("{}"), 42); in TEST()
164 res = fmt::format_to_n(buffer, buffer_size, FMT_COMPILE("{:x}"), 42); in TEST()
170 EXPECT_EQ(">>>42<<<", fmt::format(FMT_COMPILE(">>>{}<<<"), 42)); in TEST()
171 EXPECT_EQ("42!", fmt::format(FMT_COMPILE("{}!"), 42)); in TEST()