Skip to content

Commit 205cf65

Browse files
johnmcfarlaneJohn McFarlane
authored andcommitted
test ASan
1 parent a873782 commit 205cf65

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
# Build and test latest on Linux using only CMake
4040
cmake:
4141
strategy:
42+
fail-fast: false
4243
matrix:
4344
compiler: [clang, gcc]
4445
include:
@@ -105,6 +106,7 @@ jobs:
105106
# Build and test many combinations on Linux/OS X using Conan
106107
conan:
107108
strategy:
109+
fail-fast: false
108110
matrix:
109111
name: [
110112
clang-head-libc++, clang-head-libstdc++,
@@ -249,6 +251,7 @@ jobs:
249251
# Build and test on Windows using Conan
250252
windows:
251253
strategy:
254+
fail-fast: false
252255
matrix:
253256
name: [2022-64, 2022-32, 2019-64, 2019-32]
254257
include:

test/unit/cmath.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ static_assert(identical(2, cnl::sqrt(4)));
1919

2020
TEST(cmake, sqrt_float) // NOLINT
2121
{
22-
auto const expected{3.5};
22+
auto const expected{new double{3.5}};
2323
auto const actual{cnl::sqrt(12.25)};
24-
ASSERT_EQ(expected, actual);
24+
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
25+
ASSERT_EQ(*expected, actual);
26+
if (actual > 42) {
27+
// NOLINTNEXTLINE(cppcoreguidelines-owning-memory)
28+
delete expected;
29+
}
2530
}

0 commit comments

Comments
 (0)