diff --git a/test/cctest/test_inspector_socket.cc b/test/cctest/test_inspector_socket.cc index 181ab6e017..741c7b189c 100644 --- a/test/cctest/test_inspector_socket.cc +++ b/test/cctest/test_inspector_socket.cc @@ -370,7 +370,7 @@ class InspectorSocketTest : public ::testing::Test { sockaddr_in addr; uv_tcp_init(&loop, &server); uv_tcp_init(&loop, &client_socket); - uv_ip4_addr("127.0.0.1", PORT, &addr); + GTEST_ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", PORT, &addr)); uv_tcp_bind(&server, reinterpret_cast(&addr), 0); GTEST_ASSERT_EQ(0, uv_listen(reinterpret_cast(&server), 1, on_new_connection)); diff --git a/test/cctest/test_inspector_socket_server.cc b/test/cctest/test_inspector_socket_server.cc index a8c3bcd2f7..61cf286729 100644 --- a/test/cctest/test_inspector_socket_server.cc +++ b/test/cctest/test_inspector_socket_server.cc @@ -194,10 +194,11 @@ class SocketWrapper { contents_.clear(); uv_tcp_init(loop_, &socket_); sockaddr_in addr; - uv_ip4_addr(host.c_str(), port, &addr); - int err = uv_tcp_connect(&connect_, &socket_, - reinterpret_cast(&addr), - ConnectionMustFail_); + int err = uv_ip4_addr(host.c_str(), port, &addr); + ASSERT_EQ(0, err); + err = uv_tcp_connect(&connect_, &socket_, + reinterpret_cast(&addr), + ConnectionMustFail_); ASSERT_EQ(0, err); SPIN_WHILE(!connection_failed_) uv_read_start(reinterpret_cast(&socket_), AllocCallback,