Apply clang-format

This commit is contained in:
Victor Zverovich 2023-12-17 07:32:22 -08:00
parent 6025bd7c37
commit afa85e46c3
2 changed files with 14 additions and 16 deletions

View File

@ -1545,12 +1545,10 @@ TEST(format_test, format_cstring) {
char nonconst[] = "nonconst";
EXPECT_EQ("nonconst", fmt::format("{0}", nonconst));
auto nullstr = static_cast<const char*>(nullptr);
EXPECT_THROW_MSG(
(void)fmt::format("{}", nullstr),
format_error, "string pointer is null");
EXPECT_THROW_MSG(
(void)fmt::format("{:s}", nullstr),
format_error, "string pointer is null");
EXPECT_THROW_MSG((void)fmt::format("{}", nullstr), format_error,
"string pointer is null");
EXPECT_THROW_MSG((void)fmt::format("{:s}", nullstr), format_error,
"string pointer is null");
}
void function_pointer_test(int, double, std::string) {}
@ -2298,10 +2296,10 @@ TEST(format_test, format_named_arg_with_locale) {
}
TEST(format_test, format_locale) {
auto loc =
std::locale({}, new fmt::format_facet<std::locale>(","));
auto loc = std::locale({}, new fmt::format_facet<std::locale>(","));
EXPECT_EQ("7,5bc,d15", fmt::format(loc, "{:Lx}", 123456789));
EXPECT_EQ("-0b111,010,110,111,100,110,100,010,101", fmt::format(loc, "{:#Lb}", -123456789));
EXPECT_EQ("-0b111,010,110,111,100,110,100,010,101",
fmt::format(loc, "{:#Lb}", -123456789));
EXPECT_EQ(" 30,071", fmt::format(loc, "{:10Lo}", 12345));
}