test: add additional assert (#3983)

Add a missing assert that checks whether `uv_pipe_init()`
succeeded or not.
This commit is contained in:
Mohammed Keyvanzadeh 2023-05-12 21:43:23 +03:30 committed by GitHub
parent ff7dcd2654
commit 8a5b0955de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,7 @@ TEST_IMPL(getters_setters) {
pipe = malloc(uv_handle_size(UV_NAMED_PIPE));
r = uv_pipe_init(loop, pipe, 0);
ASSERT(r == 0);
ASSERT(uv_handle_get_type((uv_handle_t*)pipe) == UV_NAMED_PIPE);
ASSERT(uv_handle_get_loop((uv_handle_t*)pipe) == loop);