Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: check result of uv_loop_init and uv_write #10126

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/cctest/test_inspector_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ static void do_write(const char* data, int len) {
uv_buf_t buf[1];
buf[0].base = const_cast<char*>(data);
buf[0].len = len;
uv_write(&req, reinterpret_cast<uv_stream_t*>(&client_socket), buf, 1,
write_done);
GTEST_ASSERT_EQ(0,
uv_write(&req, reinterpret_cast<uv_stream_t*>(&client_socket),
buf, 1, write_done));
SPIN_WHILE(req.data);
}

Expand Down Expand Up @@ -360,7 +361,7 @@ class InspectorSocketTest : public ::testing::Test {
connected = false;
inspector_ready = false;
last_event = kInspectorHandshakeHttpGet;
uv_loop_init(&loop);
GTEST_ASSERT_EQ(0, uv_loop_init(&loop));
server = uv_tcp_t();
client_socket = uv_tcp_t();
server.data = &inspector;
Expand Down