Skip to content

Commit 9b0ebd4

Browse files
committed
Cleanup base-test
1 parent 7af94e5 commit 9b0ebd4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/base-test.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ TYPED_TEST(numeric_arg_test, make_and_visit) {
464464
#if FMT_USE_CONSTEXPR
465465

466466
enum class arg_id_result { none, index, name };
467+
467468
struct test_arg_id_handler {
468469
arg_id_result res = arg_id_result::none;
469470
int index = 0;
@@ -481,7 +482,7 @@ struct test_arg_id_handler {
481482
};
482483

483484
template <size_t N>
484-
constexpr test_arg_id_handler parse_arg_id(const char (&s)[N]) {
485+
constexpr auto parse_arg_id(const char (&s)[N]) -> test_arg_id_handler {
485486
auto h = test_arg_id_handler();
486487
fmt::detail::parse_arg_id(s, s + N, h);
487488
return h;
@@ -539,7 +540,7 @@ struct test_format_string_handler {
539540
bool error = false;
540541
};
541542

542-
template <size_t N> constexpr bool parse_string(const char (&s)[N]) {
543+
template <size_t N> constexpr auto parse_string(const char (&s)[N]) -> bool {
543544
auto h = test_format_string_handler();
544545
fmt::detail::parse_format_string(fmt::string_view(s, N - 1), h);
545546
return !h.error;
@@ -553,6 +554,7 @@ TEST(base_test, constexpr_parse_format_string) {
553554
static_assert(parse_string("{foo}"), "");
554555
static_assert(parse_string("{:}"), "");
555556
}
557+
556558
#endif // FMT_USE_CONSTEXPR
557559

558560
struct enabled_formatter {};
@@ -803,7 +805,7 @@ TEST(base_test, format_nonconst) {
803805
}
804806

805807
TEST(base_test, throw_in_buffer_dtor) {
806-
enum { buffer_size = 256 };
808+
constexpr int buffer_size = 256;
807809

808810
struct throwing_iterator {
809811
int& count;

0 commit comments

Comments
 (0)