Skip to content

Commit a2a9767

Browse files
johnmcfarlaneJohn McFarlane
authored and
John McFarlane
committed
test ASan
1 parent 623c335 commit a2a9767

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
# Build and test many combinations on Linux/OS X using Conan
1111
clang-tidy:
1212
strategy:
13+
fail-fast: false
1314
matrix:
1415
int128: ["True", "False"]
1516

@@ -71,6 +72,7 @@ jobs:
7172
# Build and test many combinations on Linux/OS X using Conan
7273
conan:
7374
strategy:
75+
fail-fast: false
7476
matrix:
7577
name: [
7678
clang-14-libc++, clang-14-libstdc++,
@@ -226,6 +228,7 @@ jobs:
226228
# Build and test on Windows using Conan
227229
windows:
228230
strategy:
231+
fail-fast: false
229232
matrix:
230233
name: [2022-64, 2022-32, 2019-64, 2019-32]
231234
include:

test/unit/cmath.cpp

+7-2
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)