mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-02 23:21:45 +01:00
Test and fix handling of exactly MAX_PACKED_ARGS arguments
This commit is contained in:
@@ -574,6 +574,10 @@ TEST(FormatterTest, ManyArgs) {
|
||||
FormatError, "argument index out of range");
|
||||
EXPECT_THROW_MSG(TestFormat<21>::format("{21}"),
|
||||
FormatError, "argument index out of range");
|
||||
enum { MAX_PACKED_ARGS = fmt::ArgList::MAX_PACKED_ARGS };
|
||||
std::string format_str = fmt::format("{{{}}}", MAX_PACKED_ARGS + 1);
|
||||
EXPECT_THROW_MSG(TestFormat<MAX_PACKED_ARGS>::format(format_str),
|
||||
FormatError, "argument index out of range");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user