Home
last modified time | relevance | path

Searched refs:ASSERT_EQ (Results 1 – 25 of 171) sorted by relevance

1234567

/libuv/test/
H A Dtest-signal.c117 ASSERT_EQ(1, ++ctx->ncalls); in signal_cb_one_shot()
224 ASSERT_EQ(1, sc.ncalls); in TEST_IMPL()
228 ASSERT_EQ(1, sc.ncalls); in TEST_IMPL()
236 ASSERT_EQ(1, sc.ncalls); in TEST_IMPL()
257 ASSERT_EQ(1, sc[0].ncalls); in TEST_IMPL()
258 ASSERT_EQ(1, sc[1].ncalls); in TEST_IMPL()
270 ASSERT_EQ(1, sc[0].ncalls); in TEST_IMPL()
271 ASSERT_EQ(1, sc[1].ncalls); in TEST_IMPL()
302 ASSERT_EQ(1, sc[2].ncalls); in TEST_IMPL()
303 ASSERT_EQ(1, sc[2].ncalls); in TEST_IMPL()
[all …]
H A Dtest-idna.c37 ASSERT_EQ(127, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
43 ASSERT_EQ(128, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
45 ASSERT_EQ(0x7FF, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
51 ASSERT_EQ(0x800, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
53 ASSERT_EQ(0xFFFF, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
59 ASSERT_EQ(0x10000, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
61 ASSERT_EQ(0x10FFFF, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
108 ASSERT_EQ(0x7F, uv__utf8_decode1(&p, b + 1)); in TEST_IMPL()
114 ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + 1)); in TEST_IMPL()
118 ASSERT_EQ(UV_EINVAL, uv__idna_toascii(b, b + 0, c, c + 1)); in TEST_IMPL()
[all …]
H A Dtest-process-priority.c38 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
55 ASSERT_EQ(priority, i); in TEST_IMPL()
62 ASSERT_EQ(priority, UV_PRIORITY_HIGH); in TEST_IMPL()
64 ASSERT_EQ(priority, UV_PRIORITY_ABOVE_NORMAL); in TEST_IMPL()
66 ASSERT_EQ(priority, UV_PRIORITY_NORMAL); in TEST_IMPL()
68 ASSERT_EQ(priority, UV_PRIORITY_BELOW_NORMAL); in TEST_IMPL()
70 ASSERT_EQ(priority, UV_PRIORITY_LOW); in TEST_IMPL()
75 ASSERT_EQ(priority, r); in TEST_IMPL()
79 ASSERT_EQ(uv_os_setpriority(0, UV_PRIORITY_HIGHEST - 1), UV_EINVAL); in TEST_IMPL()
80 ASSERT_EQ(uv_os_setpriority(0, UV_PRIORITY_LOW + 1), UV_EINVAL); in TEST_IMPL()
H A Dtest-error.c67 ASSERT_EQ(uv_translate_sys_error(ERROR_NOACCESS), UV_EFAULT); in TEST_IMPL()
68 ASSERT_EQ(uv_translate_sys_error(ERROR_ELEVATION_REQUIRED), UV_EACCES); in TEST_IMPL()
69 ASSERT_EQ(uv_translate_sys_error(WSAEADDRINUSE), UV_EADDRINUSE); in TEST_IMPL()
70 ASSERT_EQ(uv_translate_sys_error(ERROR_BAD_PIPE), UV_EPIPE); in TEST_IMPL()
72 ASSERT_EQ(uv_translate_sys_error(EPERM), UV_EPERM); in TEST_IMPL()
73 ASSERT_EQ(uv_translate_sys_error(EPIPE), UV_EPIPE); in TEST_IMPL()
74 ASSERT_EQ(uv_translate_sys_error(EINVAL), UV_EINVAL); in TEST_IMPL()
76 ASSERT_EQ(uv_translate_sys_error(UV_EINVAL), UV_EINVAL); in TEST_IMPL()
77 ASSERT_EQ(uv_translate_sys_error(UV_ERANGE), UV_ERANGE); in TEST_IMPL()
78 ASSERT_EQ(uv_translate_sys_error(UV_EACCES), UV_EACCES); in TEST_IMPL()
H A Dtest-pipe-bind-error.c57 ASSERT_EQ(r, UV_EADDRINUSE); in TEST_IMPL()
62 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
69 ASSERT_EQ(2, close_cb_called); in TEST_IMPL()
84 ASSERT_EQ(r, UV_EACCES); in TEST_IMPL()
90 ASSERT_EQ(1, close_cb_called); in TEST_IMPL()
106 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
130 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
160 ASSERT_EQ(status, UV_EINVAL); in connect_overlong_cb()
186 ASSERT_EQ(UV_ENAMETOOLONG, in TEST_IMPL()
193 ASSERT_EQ(UV_EINVAL, in TEST_IMPL()
[all …]
H A Dtest-homedir.c40 ASSERT_EQ(strlen(homedir), len); in TEST_IMPL()
42 ASSERT_EQ(homedir[len], '\0'); in TEST_IMPL()
46 ASSERT_EQ(homedir[2], '\\'); in TEST_IMPL()
51 ASSERT_EQ(homedir[0], '/'); in TEST_IMPL()
59 ASSERT_EQ(r, UV_ENOBUFS); in TEST_IMPL()
64 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
66 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
69 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
74 ASSERT_EQ(r, 0); in TEST_IMPL()
77 ASSERT_EQ(r, UV_ENOENT); in TEST_IMPL()
H A Dtest-shutdown-eof.c57 ASSERT_EQ(1, nread); in read_cb()
59 ASSERT_EQ(buf->base[0], 'Q'); in read_cb()
64 ASSERT_EQ(nread, UV_EOF); in read_cb()
77 ASSERT_EQ(1, called_connect_cb); in shutdown_cb()
117 ASSERT_EQ(1, called_connect_cb); in tcp_close_cb()
120 ASSERT_EQ(1, called_timer_cb); in tcp_close_cb()
177 ASSERT_EQ(1, called_connect_cb); in TEST_IMPL()
178 ASSERT_EQ(1, called_shutdown_cb); in TEST_IMPL()
181 ASSERT_EQ(1, called_tcp_close_cb); in TEST_IMPL()
182 ASSERT_EQ(1, called_timer_close_cb); in TEST_IMPL()
[all …]
H A Dtest-fs.c1197 ASSERT_EQ(2, r); in TEST_IMPL()
2464 ASSERT_EQ(2, r); in test_symlink_dir_impl()
2484 ASSERT_EQ(2, r); in test_symlink_dir_impl()
2591 ASSERT_EQ(1, r); in TEST_IMPL()
4086 ASSERT_EQ(3, r); in fs_file_pos_common()
4092 ASSERT_EQ(1, r); in fs_file_pos_common()
4104 ASSERT_EQ(1, r); in fs_file_pos_common()
4161 ASSERT_EQ(1, r); in fs_file_pos_write()
4200 ASSERT_EQ(1, r); in fs_file_pos_append()
4205 ASSERT_EQ(1, r); in fs_file_pos_append()
[all …]
H A Dtest-fs-readdir.c52 ASSERT_EQ(req->fs_type, UV_FS_CLOSEDIR); in empty_closedir_cb()
63 ASSERT_EQ(req->fs_type, UV_FS_READDIR); in empty_readdir_cb()
79 ASSERT_EQ(req->fs_type, UV_FS_OPENDIR); in empty_opendir_cb()
156 ASSERT_EQ(1, empty_opendir_cb_count); in TEST_IMPL()
174 ASSERT_EQ(req->result, UV_ENOENT); in non_existing_opendir_cb()
192 ASSERT_EQ(r, UV_ENOENT); in TEST_IMPL()
226 ASSERT_EQ(req->result, UV_ENOTDIR); in file_opendir_cb()
245 ASSERT_EQ(r, UV_ENOTDIR); in TEST_IMPL()
261 ASSERT_EQ(1, file_opendir_cb_count); in TEST_IMPL()
298 ASSERT_EQ(1, req->result); in non_empty_readdir_cb()
[all …]
H A Dtest-shutdown-simultaneous.c47 ASSERT_EQ(1, called_connect_cb); in shutdown_cb()
61 ASSERT_EQ(4, nread); in read_cb()
71 ASSERT_EQ(nread, UV_EOF); in read_cb()
90 ASSERT_EQ(UV_EINVAL, uv_read_start(NULL, alloc_cb, read_cb)); in connect_cb()
91 ASSERT_EQ(UV_EINVAL, uv_read_start((uv_stream_t*)&tcp, NULL, read_cb)); in connect_cb()
92 ASSERT_EQ(UV_EINVAL, uv_read_start((uv_stream_t*)&tcp, alloc_cb, NULL)); in connect_cb()
98 ASSERT_EQ(qbuf.len, uv_try_write((uv_stream_t*) &tcp, &qbuf, 1)); in connect_cb()
128 ASSERT_EQ(1, called_connect_cb); in TEST_IMPL()
129 ASSERT_EQ(1, called_shutdown_cb); in TEST_IMPL()
130 ASSERT_EQ(1, got_eof); in TEST_IMPL()
[all …]
H A Dtest-pipe-getsockname.c84 ASSERT_EQ(len, 6); in check_is_autobind_abstract_socket_name()
85 ASSERT_EQ(*p, '\0'); in check_is_autobind_abstract_socket_name()
140 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
144 ASSERT_EQ(r, UV_EBADF); in TEST_IMPL()
148 ASSERT_EQ(r, UV_EBADF); in TEST_IMPL()
164 ASSERT_EQ(buf[len], '\0'); in TEST_IMPL()
179 ASSERT_EQ(r, UV_EBADF); in TEST_IMPL()
183 ASSERT_EQ(r, UV_EBADF); in TEST_IMPL()
195 ASSERT_EQ(r, 0); in TEST_IMPL()
196 ASSERT_EQ(len, 0); in TEST_IMPL()
[all …]
H A Dtest-get-passwd.c76 ASSERT_EQ(pwd.uid, geteuid()); in TEST_IMPL()
79 ASSERT_EQ(pwd.gid, getegid()); in TEST_IMPL()
98 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
122 ASSERT_EQ(r, UV_ENOTSUP); in TEST_IMPL()
127 ASSERT_EQ(pwd.uid, pwd2.uid); in TEST_IMPL()
161 ASSERT_EQ(r, UV_ENOTSUP); in TEST_IMPL()
163 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
187 ASSERT_EQ(r, UV_ENOTSUP); in TEST_IMPL()
192 ASSERT_EQ(pwd.gid, grp.gid); in TEST_IMPL()
205 ASSERT_EQ(r, UV_ENOTSUP); in TEST_IMPL()
[all …]
H A Dtest-env-vars.c43 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
45 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
47 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
52 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
54 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
56 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
59 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
63 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
90 ASSERT_EQ(r, UV_ENOENT); in TEST_IMPL()
137 ASSERT_EQ(2, found); in TEST_IMPL()
[all …]
H A Dtest-udp-connect.c89 ASSERT_EQ(4, nread); in sv_recv_cb()
143 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
151 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
153 ASSERT_EQ(4, r); in TEST_IMPL()
155 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
160 ASSERT_EQ(r, UV_ENOTCONN); in TEST_IMPL()
164 ASSERT_EQ(r, UV_ENOTCONN); in TEST_IMPL()
168 ASSERT_EQ(4, r); in TEST_IMPL()
170 ASSERT_EQ(r, UV_EDESTADDRREQ); in TEST_IMPL()
181 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
[all …]
H A Dtest-udp-connect6.c89 ASSERT_EQ(4, nread); in sv_recv_cb()
146 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
154 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
156 ASSERT_EQ(4, r); in TEST_IMPL()
158 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
163 ASSERT_EQ(r, UV_ENOTCONN); in TEST_IMPL()
167 ASSERT_EQ(r, UV_ENOTCONN); in TEST_IMPL()
171 ASSERT_EQ(4, r); in TEST_IMPL()
173 ASSERT_EQ(r, UV_EDESTADDRREQ); in TEST_IMPL()
184 ASSERT_EQ(r, UV_EISCONN); in TEST_IMPL()
[all …]
H A Dtest-ip4-addr.c35 ASSERT_EQ(UV_ENOSPC, uv_inet_ntop(AF_INET, "\xFF\xFF\xFF\xFF", in TEST_IMPL()
40 ASSERT_EQ(UV_EINVAL, uv_ip4_addr("255.255.255*000", TEST_PORT, &addr)); in TEST_IMPL()
41 ASSERT_EQ(UV_EINVAL, uv_ip4_addr("255.255.255.256", TEST_PORT, &addr)); in TEST_IMPL()
42 ASSERT_EQ(UV_EINVAL, uv_ip4_addr("2555.0.0.0", TEST_PORT, &addr)); in TEST_IMPL()
43 ASSERT_EQ(UV_EINVAL, uv_ip4_addr("255", TEST_PORT, &addr)); in TEST_IMPL()
46 ASSERT_EQ(addr.sin_len, sizeof(addr)); in TEST_IMPL()
50 ASSERT_EQ(UV_EAFNOSUPPORT, uv_inet_pton(42, "127.0.0.1", in TEST_IMPL()
H A Dtest-tcp-bind-error.c73 ASSERT_EQ(1, close_cb_called); in TEST_IMPL()
99 ASSERT_EQ(r, UV_EADDRINUSE); in TEST_IMPL()
106 ASSERT_EQ(2, close_cb_called); in TEST_IMPL()
131 ASSERT_EQ(1, close_cb_called); in TEST_IMPL()
154 ASSERT_EQ(1, close_cb_called); in TEST_IMPL()
173 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
201 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
241 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
283 ASSERT_EQ(r, UV_EPIPE); in TEST_IMPL()
285 ASSERT_EQ(r, UV_ENOTCONN); in TEST_IMPL()
[all …]
H A Dtest-tmpdir.c42 ASSERT_EQ(strlen(tmpdir), len); in TEST_IMPL()
44 ASSERT_EQ(tmpdir[len], '\0'); in TEST_IMPL()
58 ASSERT_EQ(r, UV_ENOBUFS); in TEST_IMPL()
63 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
65 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
68 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
82 ASSERT_EQ(r, 0); in TEST_IMPL()
85 ASSERT_EQ(r, UV_ENOENT); in TEST_IMPL()
H A Dtest-udp-options.c59 ASSERT_EQ(r, UV_ENOTSUP); in udp_options_test()
67 ASSERT_EQ(r, UV_EINVAL); in udp_options_test()
84 ASSERT_EQ(r, UV_EINVAL); in udp_options_test()
123 ASSERT_EQ(UV_EBADF, uv_udp_set_multicast_ttl(&h, 32)); in TEST_IMPL()
124 ASSERT_EQ(UV_EBADF, uv_udp_set_broadcast(&h, 1)); in TEST_IMPL()
126 ASSERT_EQ(UV_ENOTSUP, uv_udp_set_ttl(&h, 1)); in TEST_IMPL()
128 ASSERT_EQ(UV_EBADF, uv_udp_set_ttl(&h, 1)); in TEST_IMPL()
130 ASSERT_EQ(UV_EBADF, uv_udp_set_multicast_loop(&h, 1)); in TEST_IMPL()
135 ASSERT_EQ(UV_EBADF, uv_udp_set_multicast_interface(&h, "0.0.0.0")); in TEST_IMPL()
146 ASSERT_EQ(UV_ENOTSUP, uv_udp_set_ttl(&h2, 1)); in TEST_IMPL()
H A Dtest-get-currentexe.c63 ASSERT_EQ(size, strlen(buffer)); in TEST_IMPL()
68 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
71 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
75 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
83 ASSERT_EQ(buffer[0], '\0'); in TEST_IMPL()
90 ASSERT_EQ(1, size); in TEST_IMPL()
92 ASSERT_EQ(buffer[1], '\0'); in TEST_IMPL()
107 ASSERT_EQ(size, strlen(buffer)); in TEST_IMPL()
H A Dtest-random.c43 ASSERT_EQ(buflen, sizeof(scratch)); in random_cb()
57 ASSERT_EQ(UV_EINVAL, uv_random(loop, &req, scratch, sizeof(scratch), -1, in TEST_IMPL()
59 ASSERT_EQ(UV_E2BIG, uv_random(loop, &req, scratch, -1, -1, random_cb)); in TEST_IMPL()
65 ASSERT_EQ(1, random_cb_called); in TEST_IMPL()
68 ASSERT_EQ(1, random_cb_called); in TEST_IMPL()
71 ASSERT_EQ(2, random_cb_called); in TEST_IMPL()
82 ASSERT_EQ(UV_EINVAL, uv_random(NULL, NULL, buf, sizeof(buf), -1, NULL)); in TEST_IMPL()
83 ASSERT_EQ(UV_E2BIG, uv_random(NULL, NULL, buf, -1, -1, NULL)); in TEST_IMPL()
H A Dtest-fs-copyfile.c53 ASSERT_EQ(req->fs_type, UV_FS_COPYFILE); in handle_result()
115 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
122 ASSERT_EQ(req.result, UV_ENOENT); in TEST_IMPL()
123 ASSERT_EQ(r, UV_ENOENT); in TEST_IMPL()
138 ASSERT_EQ(12, req.statbuf.st_size); in TEST_IMPL()
164 ASSERT_EQ(r, UV_EEXIST); in TEST_IMPL()
187 ASSERT_EQ(5, result_check_count); in TEST_IMPL()
189 ASSERT_EQ(6, result_check_count); in TEST_IMPL()
197 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
223 ASSERT_EQ(req.result, UV_EACCES); in TEST_IMPL()
[all …]
H A Dtest-ipc.c180 ASSERT_EQ(pending, UV_TCP); in on_read()
249 ASSERT_EQ(pending, UV_TCP); in on_read_listen_after_bound_twice()
260 ASSERT_EQ(pending, UV_TCP); in on_read_listen_after_bound_twice()
268 ASSERT_EQ(r, UV_EADDRINUSE); in on_read_listen_after_bound_twice()
386 ASSERT_EQ(pending, UV_TCP); in on_read_connection()
439 ASSERT_EQ(1, read_cb_called); in TEST_IMPL()
440 ASSERT_EQ(1, exit_cb_called); in TEST_IMPL()
452 ASSERT_EQ(1, read_cb_called); in TEST_IMPL()
453 ASSERT_EQ(1, exit_cb_called); in TEST_IMPL()
463 ASSERT_EQ(1, read_cb_called); in TEST_IMPL()
[all …]
H A Dtest-gethostname.c35 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
37 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
40 ASSERT_EQ(r, UV_EINVAL); in TEST_IMPL()
46 ASSERT_EQ(r, UV_ENOBUFS); in TEST_IMPL()
47 ASSERT_EQ(buf[0], '\0'); in TEST_IMPL()
55 ASSERT_EQ(size + 1, enobufs_size); in TEST_IMPL()
H A Dtest-timer.c151 ASSERT_EQ(10, once_cb_called); in TEST_IMPL()
152 ASSERT_EQ(10, once_close_cb_called); in TEST_IMPL()
154 ASSERT_EQ(5, repeat_cb_called); in TEST_IMPL()
155 ASSERT_EQ(1, repeat_close_cb_called); in TEST_IMPL()
177 ASSERT_EQ(1, twice_cb_called); in TEST_IMPL()
225 ASSERT_EQ(2, order_cb_called); in TEST_IMPL()
239 ASSERT_EQ(2, order_cb_called); in TEST_IMPL()
261 ASSERT_EQ(1, zero_timeout_cb_calls); in TEST_IMPL()
264 ASSERT_EQ(1, zero_timeout_cb_calls); in TEST_IMPL()
338 ASSERT_EQ(1, timer_run_once_timer_cb_called); in TEST_IMPL()
[all …]

Completed in 41 milliseconds

1234567