Skip to content

Commit

Permalink
Update unit test to include logging
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhihao-723 committed Aug 15, 2024
1 parent a89ff14 commit 15d34d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/core/tests/test-NetworkReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ TEST_CASE("network_reader_illegal_offset", "[NetworkReader]") {
while (true) {
auto const ret_code{reader.get_curl_ret_code()};
if (ret_code.has_value()) {
REQUIRE((CURLE_HTTP_RETURNED_ERROR == ret_code.value()));
if (CURLE_HTTP_RETURNED_ERROR != ret_code.value()) {
std::string const error_message{
"Unexpected CURL error code: " + std::to_string(ret_code.value())
};
FAIL(error_message);
}
size_t pos{};
REQUIRE((clp::ErrorCode_Failure == reader.try_get_pos(pos)));
break;
Expand Down

0 comments on commit 15d34d1

Please sign in to comment.