| 24 | } |
| 25 | |
| 26 | TEST(test_list, SendReceivedInt32) |
| 27 | { |
| 28 | list_int32_1_t *received_list, send_list; |
| 29 | send_list.elementsCount = 12; |
| 30 | send_list.elements = (int32_t *)erpc_malloc(send_list.elementsCount * sizeof(int32_t)); |
| 31 | int32_t *list_s = send_list.elements; |
| 32 | for (uint32_t i = 0; i < send_list.elementsCount; ++i) |
| 33 | { |
| 34 | *list_s = (int32_t)i; |
| 35 | ++list_s; |
| 36 | } |
| 37 | |
| 38 | received_list = sendReceivedInt32(&send_list); |
| 39 | |
| 40 | list_s = send_list.elements; |
| 41 | int32_t *list_r = received_list->elements; |
| 42 | for (uint32_t i = 0; i < received_list->elementsCount; ++i) |
| 43 | { |
| 44 | EXPECT_EQ(*list_r / 2, *list_s); |
| 45 | ++list_s; |
| 46 | ++list_r; |
| 47 | } |
| 48 | erpc_free(send_list.elements); |
| 49 | erpc_free(received_list->elements); |
| 50 | erpc_free(received_list); |
| 51 | } |
| 52 | |
| 53 | TEST(test_list, sendReceiveZeroSize) |
| 54 | { |
nothing calls this directly
no test coverage detected