Skip to content

Commit

Permalink
provoke assertion
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pauldreik committed Apr 28, 2019
1 parent e196601 commit b8d7091
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/chrono-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b8d7091

Please sign in to comment.