Skip to content

Commit 233d8d9

Browse files
committed
Fix unused return warning
1 parent 167ec54 commit 233d8d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/format-test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,6 @@ TEST(format_test, named_arg) {
582582
EXPECT_EQ("1/a/A", fmt::format("{_1}/{a_}/{A_}", fmt::arg("a_", 'a'),
583583
fmt::arg("A_", "A"), fmt::arg("_1", 1)));
584584
EXPECT_EQ(fmt::format("{0:{width}}", -42, fmt::arg("width", 4)), " -42");
585-
EXPECT_THROW_MSG(fmt::format("{enum}", fmt::arg("enum", 1), fmt::arg("enum", 10)),
586-
format_error, "duplicate named args found");
587585
EXPECT_EQ("st",
588586
fmt::format("{0:.{precision}}", "str", fmt::arg("precision", 2)));
589587
EXPECT_EQ(fmt::format("{} {two}", 1, fmt::arg("two", 2)), "1 2");
@@ -601,6 +599,8 @@ TEST(format_test, named_arg) {
601599
EXPECT_THROW_MSG((void)fmt::format(runtime("{a} {}"), fmt::arg("a", 2), 42),
602600
format_error,
603601
"cannot switch from manual to automatic argument indexing");
602+
EXPECT_THROW_MSG((void)fmt::format("{enum}", fmt::arg("enum", 1),
603+
fmt::arg("enum", 10)), format_error, "duplicate named args found");
604604
}
605605

606606
TEST(format_test, auto_arg_index) {

0 commit comments

Comments
 (0)