| 127 | }; |
| 128 | |
| 129 | static int read_array(void *cookie, void *buffer, size_t *size) |
| 130 | { |
| 131 | array_cursor *arr = static_cast<array_cursor*>(cookie); |
| 132 | size_t rem = *size; |
| 133 | if (rem > arr->size - arr->off) { |
| 134 | rem = arr->size - arr->off; |
| 135 | } |
| 136 | |
| 137 | std::memcpy(buffer, (char *) arr->buf + arr->off, rem); |
| 138 | arr->off += rem; |
| 139 | *size = rem; |
| 140 | |
| 141 | return 0; |
| 142 | } |
| 143 | |
| 144 | Test(asserts, stream) { |
| 145 | struct array_cursor arr1 = { |
nothing calls this directly
no outgoing calls
no test coverage detected