Skip to content

Commit f6df622

Browse files
committed
Address coderabbit comment on cpp
1 parent 59f3679 commit f6df622

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/ystdlib/error_handling/test/test_ErrorCode.cpp

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,11 @@ TEST_CASE("test_error_code", "[error_handling][ErrorCode]") {
4949

5050
TEST_CASE("test_error_code_failure_condition", "[error_handling][ErrorCode]") {
5151
std::error_code const failure_error_code{BinaryErrorCode{BinaryErrorCodeEnum::Failure}};
52-
std::for_each(
53-
cFailureConditions.cbegin(),
54-
cFailureConditions.cend(),
55-
[&](auto const& failure_condition) { REQUIRE(failure_error_code == failure_condition); }
56-
);
57-
58-
std::for_each(
59-
cNoneFailureConditions.cbegin(),
60-
cNoneFailureConditions.cend(),
61-
[&](auto const& none_failure_condition) {
62-
REQUIRE(failure_error_code != none_failure_condition);
63-
}
64-
);
52+
for (auto const& failure_condition : cFailureConditions) {
53+
REQUIRE(failure_error_code == failure_condition);
54+
}
55+
for (auto const& none_failure_condition : cNoneFailureConditions) {
56+
REQUIRE(failure_error_code != none_failure_condition);
57+
}
6558
}
6659
} // namespace ystdlib::error_handling::test

0 commit comments

Comments
 (0)