From a7156026b3b4284fce7c025ceea4b7d57d21c85f Mon Sep 17 00:00:00 2001 From: Christian Mazakas <5543573+cmazakas@users.noreply.github.com> Date: Wed, 2 Nov 2022 11:22:17 -0700 Subject: [PATCH] Fix typo, potential UB in overflow check and refactor to use BOOST_ASSERT_MSG() (#157) --- test/helpers/generators.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/helpers/generators.hpp b/test/helpers/generators.hpp index 084184e0..ba4f9e0b 100644 --- a/test/helpers/generators.hpp +++ b/test/helpers/generators.hpp @@ -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++; }