mirror of
https://github.com/fmtlib/fmt.git
synced 2025-10-29 21:21:44 +01:00
FMT_NUMERIC_ALIGN -> FMT_DEPRECATED_NUMERIC_ALIGN
This commit is contained in:
@@ -605,7 +605,7 @@ TEST(FormatterTest, RightAlign) {
|
||||
EXPECT_EQ(" 0xface", format("{0:>8}", reinterpret_cast<void*>(0xface)));
|
||||
}
|
||||
|
||||
#if FMT_NUMERIC_ALIGN
|
||||
#if FMT_DEPRECATED_NUMERIC_ALIGN
|
||||
TEST(FormatterTest, NumericAlign) { EXPECT_EQ("0042", format("{0:=4}", 42)); }
|
||||
#endif
|
||||
|
||||
@@ -1887,7 +1887,7 @@ TEST(FormatTest, DynamicFormatter) {
|
||||
"cannot switch from manual to automatic argument indexing");
|
||||
EXPECT_THROW_MSG(format("{:{0}}", num), format_error,
|
||||
"cannot switch from automatic to manual argument indexing");
|
||||
#if FMT_NUMERIC_ALIGN
|
||||
#if FMT_DEPRECATED_NUMERIC_ALIGN
|
||||
EXPECT_THROW_MSG(format("{:=}", str), format_error,
|
||||
"format specifier requires numeric argument");
|
||||
#endif
|
||||
@@ -2327,7 +2327,7 @@ TEST(FormatTest, FormatStringErrors) {
|
||||
EXPECT_ERROR("{:10000000000}", "number is too big", int);
|
||||
EXPECT_ERROR("{:.10000000000}", "number is too big", int);
|
||||
EXPECT_ERROR_NOARGS("{:x}", "argument not found");
|
||||
# if FMT_NUMERIC_ALIGN
|
||||
# if FMT_DEPRECATED_NUMERIC_ALIGN
|
||||
EXPECT_ERROR("{0:=5", "unknown format specifier", int);
|
||||
EXPECT_ERROR("{:=}", "format specifier requires numeric argument",
|
||||
const char*);
|
||||
|
||||
@@ -96,7 +96,7 @@ TEST(OStreamTest, Format) {
|
||||
TEST(OStreamTest, FormatSpecs) {
|
||||
EXPECT_EQ("def ", format("{0:<5}", TestString("def")));
|
||||
EXPECT_EQ(" def", format("{0:>5}", TestString("def")));
|
||||
#if FMT_NUMERIC_ALIGN
|
||||
#if FMT_DEPRECATED_NUMERIC_ALIGN
|
||||
EXPECT_THROW_MSG(format("{0:=5}", TestString("def")), format_error,
|
||||
"format specifier requires numeric argument");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user