Skip to content

Commit 5f682e2

Browse files
johnmcfarlaneJohn McFarlane
authored and
John McFarlane
committed
test ASan
1 parent 0f514e8 commit 5f682e2

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

@@ -70,6 +71,7 @@ jobs:
7071
# Build and test many combinations on Linux/OS X using Conan
7172
conan:
7273
strategy:
74+
fail-fast: false
7375
matrix:
7476
name: [
7577
clang-14-libc++, clang-14-libstdc++,
@@ -225,6 +227,7 @@ jobs:
225227
# Build and test on Windows using Conan
226228
windows:
227229
strategy:
230+
fail-fast: false
228231
matrix:
229232
name: [2022-64, 2022-32, 2019-64, 2019-32]
230233
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)