blob: ca85800c071b2771e567f90190fa6e2b3dcb9db0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
// SPDX-License-Identifier: GPL-3.0-or-later
#include "test_exporting_engine.h"
void __wrap_uv_thread_create(uv_thread_t thread, void (*worker)(void *arg), void *arg)
{
function_called();
check_expected_ptr(thread);
check_expected_ptr(worker);
check_expected_ptr(arg);
}
void __wrap_uv_mutex_lock(uv_mutex_t *mutex)
{
(void)mutex;
}
void __wrap_uv_mutex_unlock(uv_mutex_t *mutex)
{
(void)mutex;
}
void __wrap_uv_cond_signal(uv_cond_t *cond_var)
{
(void)cond_var;
}
void __wrap_uv_cond_wait(uv_cond_t *cond_var, uv_mutex_t *mutex)
{
(void)cond_var;
(void)mutex;
}
ssize_t __wrap_recv(int sockfd, void *buf, size_t len, int flags)
{
function_called();
check_expected(sockfd);
check_expected_ptr(buf);
check_expected(len);
check_expected(flags);
char *mock_string = "Test recv";
strcpy(buf, mock_string);
return strlen(mock_string);
}
ssize_t __wrap_send(int sockfd, const void *buf, size_t len, int flags)
{
function_called();
check_expected(sockfd);
check_expected_ptr(buf);
check_expected_ptr(buf);
check_expected(len);
check_expected(flags);
return strlen(buf);
}
|