Simplify fill and alignment parsing

This commit is contained in:
Victor Zverovich
2022-12-23 10:12:05 -08:00
parent 040dc2a5d4
commit bde1a6070d
4 changed files with 31 additions and 23 deletions

View File

@@ -586,7 +586,6 @@ TEST(core_test, constexpr_parse_format_specs) {
static_assert(parse_test_specs(".42").precision == 42, "");
static_assert(parse_test_specs(".{42}").precision_ref.val.index == 42, "");
static_assert(parse_test_specs("d").type == fmt::presentation_type::dec, "");
static_assert(parse_test_specs("{<").res == handler::error, "");
}
struct test_parse_context {
@@ -652,7 +651,6 @@ TEST(format_test, constexpr_specs_checker) {
static_assert(check_specs(".42").precision == 42, "");
static_assert(check_specs(".{42}").precision_ref.val.index == 42, "");
static_assert(check_specs("d").type == fmt::presentation_type::dec, "");
static_assert(check_specs("{<").res == handler::error, "");
}
struct test_format_string_handler {

View File

@@ -2214,7 +2214,6 @@ TEST(format_test, format_string_errors) {
EXPECT_ERROR("{0:s", "unknown format specifier", date);
# if !FMT_MSC_VERSION || FMT_MSC_VERSION >= 1916
// This causes an detail compiler error in MSVC2017.
EXPECT_ERROR("{:{<}", "invalid fill character '{'", int);
EXPECT_ERROR("{:10000000000}", "number is too big", int);
EXPECT_ERROR("{:.10000000000}", "number is too big", int);
EXPECT_ERROR_NOARGS("{:x}", "argument not found");