Skip to content

Commit 62ccb44

Browse files
Update src/ystdlib/error_handling/test/test_ErrorCode.cpp
Co-authored-by: Lin Zhihao <[email protected]>
1 parent e1e06d8 commit 62ccb44

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/ystdlib/error_handling/test/test_ErrorCode.cpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,11 @@ TEST_CASE("test_error_code", "[error_handling][ErrorCode]") {
5050

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

0 commit comments

Comments
 (0)