Skip to content

Commit 0870d05

Browse files
author
Arto Kinnunen
authored
Update unit test stubs to match latest socket api (ARMmbed#55)
1 parent e687be8 commit 0870d05

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

test/coap-service/unittest/stub/socket_api_stub.c

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@ int8_t socket_bind(int8_t socket, const ns_address_t *address)
5858
return socket_api_stub.int8_value;
5959
}
6060

61-
int8_t socket_send(int8_t socket, uint8_t *buffer, uint16_t length)
62-
{
63-
if( socket_api_stub.counter >= 0){
64-
return socket_api_stub.values[socket_api_stub.counter--];
65-
}
66-
67-
return socket_api_stub.int8_value;
68-
}
6961
int16_t socket_read(int8_t socket, ns_address_t *address, uint8_t *buffer, uint16_t length)
7062
{
7163
if( address ){
@@ -78,14 +70,6 @@ int16_t socket_read(int8_t socket, ns_address_t *address, uint8_t *buffer, uint1
7870

7971
return socket_api_stub.int8_value;
8072
}
81-
int8_t socket_sendto(int8_t socket, ns_address_t *address, uint8_t *buffer, uint16_t length)
82-
{
83-
if( socket_api_stub.counter >= 0){
84-
return socket_api_stub.values[socket_api_stub.counter--];
85-
}
86-
87-
return socket_api_stub.int8_value;
88-
}
8973
int8_t socket_getpeername(int8_t socket, ns_address_t *address)
9074
{
9175
if( socket_api_stub.counter >= 0){
@@ -110,8 +94,7 @@ int8_t socket_getsockopt(int8_t socket, uint8_t level, uint8_t opt_name, void *o
11094

11195
return socket_api_stub.int8_value;
11296
}
113-
114-
int8_t socket_sendmsg(int8_t socket, const ns_msghdr_t *msg, int flags)
97+
int16_t socket_sendmsg(int8_t socket, const ns_msghdr_t *msg, int flags)
11598
{
11699
if( socket_api_stub.counter >= 0){
117100
return socket_api_stub.values[socket_api_stub.counter--];

0 commit comments

Comments
 (0)