Skip to content

Commit

Permalink
test UBSan
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmcfarlane authored and John McFarlane committed Dec 31, 2021
1 parent a873782 commit dd82fcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
# Build and test latest on Linux using only CMake
cmake:
strategy:
fail-fast: false
matrix:
compiler: [clang, gcc]
include:
Expand Down Expand Up @@ -105,6 +106,7 @@ jobs:
# Build and test many combinations on Linux/OS X using Conan
conan:
strategy:
fail-fast: false
matrix:
name: [
clang-head-libc++, clang-head-libstdc++,
Expand Down Expand Up @@ -249,6 +251,7 @@ jobs:
# Build and test on Windows using Conan
windows:
strategy:
fail-fast: false
matrix:
name: [2022-64, 2022-32, 2019-64, 2019-32]
include:
Expand Down
6 changes: 2 additions & 4 deletions test/unit/overflow/overflow_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,11 +514,9 @@ namespace test_used_digits {
namespace {
TEST(overflow_integer, pre_increment) // NOLINT
{
auto a = cnl::overflow_integer<>{INT_MAX - 1};
auto a = INT_MAX;
auto& b = ++a;
static_assert(
std::is_same<decltype(b), cnl::overflow_integer<>&>::value,
"static_integer pre-increment return value");
--a;
ASSERT_EQ(&b, &a) << "static_integer pre-increment return address";
ASSERT_EQ(INT_MAX, b) << "static_integer pre-increment";
}
Expand Down

0 comments on commit dd82fcd

Please sign in to comment.