Fix typo, potential UB in overflow check and refactor to use BOOST_ASSERT_MSG() (#157)

This commit is contained in:
Christian Mazakas 2022-11-02 11:22:17 -07:00 committed by GitHub
parent 189e551dc7
commit a7156026b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,8 +43,8 @@ namespace test {
inline int generate(int const*, random_generator g)
{
if (g == sequential) {
BOOST_ASSERT(
g + 1 < INT_MAX && "test::reset_sequence() should be invoked");
BOOST_ASSERT_MSG(
origin < INT_MAX, "test::reset_sequence() should be invoked");
return origin++;
}