Skip to content

Commit 060d3f1

Browse files
committed
fix gcc + clang-cl tests
Signed-off-by: Martijn Govers <[email protected]>
1 parent 6fab6c1 commit 060d3f1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/cpp_unit_tests/test_job_dispatch.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,7 @@ class JobAdapterMock : public JobInterface<JobAdapterMock> {
9494
void setup_impl(MockUpdateDataset const& /*update_data*/, Idx /*scenario_idx*/) const { ++(counter_->setup_calls); }
9595
void winddown_impl() const { ++(counter_->winddown_calls); }
9696
void reset_logger_impl() {
97-
if (counter_ ==
98-
nullptr) { // this if statement may be encountered when the destructor is called on a moved object
99-
REQUIRE_MESSAGE(logger_ == nullptr,
100-
"Dangling references encountered; not all clean-ups have gone correctly");
101-
} else {
97+
if (counter_ != nullptr) { // this may happen when the destructor is called on a moved object
10298
++(counter_->reset_logger_calls);
10399
logger_ = nullptr;
104100
}
@@ -117,7 +113,7 @@ class SomeTestException : public std::runtime_error {
117113
class TestLogger : public common::logging::Logger {
118114
public:
119115
struct EmptyEvent {};
120-
static constexpr EmptyEvent empty_event;
116+
static constexpr EmptyEvent empty_event{};
121117

122118
struct Entry {
123119
LogEvent event;

0 commit comments

Comments
 (0)