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"; char nonconst[] = "nonconst";
EXPECT_EQ("nonconst", fmt::format("{0}", nonconst)); EXPECT_EQ("nonconst", fmt::format("{0}", nonconst));
auto nullstr = static_cast<const char*>(nullptr); auto nullstr = static_cast<const char*>(nullptr);
EXPECT_THROW_MSG( EXPECT_THROW_MSG((void)fmt::format("{}", nullstr), format_error,
(void)fmt::format("{}", nullstr), "string pointer is null");
format_error, "string pointer is null"); EXPECT_THROW_MSG((void)fmt::format("{:s}", nullstr), format_error,
EXPECT_THROW_MSG( "string pointer is null");
(void)fmt::format("{:s}", nullstr),
format_error, "string pointer is null");
} }
void function_pointer_test(int, double, std::string) {} 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) { TEST(format_test, format_locale) {
auto loc = auto loc = std::locale({}, new fmt::format_facet<std::locale>(","));
std::locale({}, new fmt::format_facet<std::locale>(","));
EXPECT_EQ("7,5bc,d15", fmt::format(loc, "{:Lx}", 123456789)); 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)); EXPECT_EQ(" 30,071", fmt::format(loc, "{:10Lo}", 12345));
} }