mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-29 03:32:42 +00:00
Apply clang-format
This commit is contained in:
parent
6025bd7c37
commit
afa85e46c3
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user