From b8d70919ea6be0d2e4c58ef82887496f55125ba9 Mon Sep 17 00:00:00 2001 From: Paul Dreik Date: Sun, 28 Apr 2019 21:29:43 +0200 Subject: [PATCH] provoke assertion fmt/include/fmt/core.h:246: typename std::make_unsigned<_Tp>::type fmt::v5::internal::to_unsigned(Int) [with Int = long int; typename std::make_unsigned<_Tp>::type = long unsigned int]: Assertion `(value >= 0) && "negative value"' failed. --- test/chrono-test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/chrono-test.cc b/test/chrono-test.cc index bb546f7b4809..76d93fbf3f16 100644 --- a/test/chrono-test.cc +++ b/test/chrono-test.cc @@ -301,4 +301,8 @@ TEST(ChronoTest, InvalidWidthId) { fmt::format_error); } +TEST(ChronoTest, InvalidColons) { + EXPECT_THROW(fmt::format("{0}=:{0::", std::chrono::seconds(0)), + fmt::format_error); +} #endif // FMT_STATIC_THOUSANDS_SEPARATOR