@@ -18,19 +18,26 @@ using namespace LIBC_NAMESPACE;
18
18
static void test_interface (bool end_with_send) {
19
19
uint64_t cnt = 0 ;
20
20
rpc::Client::Port port = rpc::client.open <RPC_TEST_INTERFACE>();
21
- port.send ([&](rpc::Buffer *buffer) { buffer->data [0 ] = end_with_send; });
22
- port.send ([&](rpc::Buffer *buffer) { buffer->data [0 ] = cnt = cnt + 1 ; });
23
- port.recv ([&](rpc::Buffer *buffer) { cnt = buffer->data [0 ]; });
24
- port.send ([&](rpc::Buffer *buffer) { buffer->data [0 ] = cnt = cnt + 1 ; });
25
- port.recv ([&](rpc::Buffer *buffer) { cnt = buffer->data [0 ]; });
26
- port.send ([&](rpc::Buffer *buffer) { buffer->data [0 ] = cnt = cnt + 1 ; });
27
- port.send ([&](rpc::Buffer *buffer) { buffer->data [0 ] = cnt = cnt + 1 ; });
28
- port.recv ([&](rpc::Buffer *buffer) { cnt = buffer->data [0 ]; });
29
- port.recv ([&](rpc::Buffer *buffer) { cnt = buffer->data [0 ]; });
21
+ port.send (
22
+ [&](rpc::Buffer *buffer, uint32_t ) { buffer->data [0 ] = end_with_send; });
23
+ port.send (
24
+ [&](rpc::Buffer *buffer, uint32_t ) { buffer->data [0 ] = cnt = cnt + 1 ; });
25
+ port.recv ([&](rpc::Buffer *buffer, uint32_t ) { cnt = buffer->data [0 ]; });
26
+ port.send (
27
+ [&](rpc::Buffer *buffer, uint32_t ) { buffer->data [0 ] = cnt = cnt + 1 ; });
28
+ port.recv ([&](rpc::Buffer *buffer, uint32_t ) { cnt = buffer->data [0 ]; });
29
+ port.send (
30
+ [&](rpc::Buffer *buffer, uint32_t ) { buffer->data [0 ] = cnt = cnt + 1 ; });
31
+ port.send (
32
+ [&](rpc::Buffer *buffer, uint32_t ) { buffer->data [0 ] = cnt = cnt + 1 ; });
33
+ port.recv ([&](rpc::Buffer *buffer, uint32_t ) { cnt = buffer->data [0 ]; });
34
+ port.recv ([&](rpc::Buffer *buffer, uint32_t ) { cnt = buffer->data [0 ]; });
30
35
if (end_with_send)
31
- port.send ([&](rpc::Buffer *buffer) { buffer->data [0 ] = cnt = cnt + 1 ; });
36
+ port.send ([&](rpc::Buffer *buffer, uint32_t ) {
37
+ buffer->data [0 ] = cnt = cnt + 1 ;
38
+ });
32
39
else
33
- port.recv ([&](rpc::Buffer *buffer) { cnt = buffer->data [0 ]; });
40
+ port.recv ([&](rpc::Buffer *buffer, uint32_t ) { cnt = buffer->data [0 ]; });
34
41
port.close ();
35
42
36
43
ASSERT_TRUE (cnt == 9 && " Invalid number of increments" );
0 commit comments