| 63 | } |
| 64 | |
| 65 | static void t_addch(struct strbuf *buf, const void *data) |
| 66 | { |
| 67 | const char *p_ch = data; |
| 68 | const char ch = *p_ch; |
| 69 | size_t orig_alloc = buf->alloc; |
| 70 | size_t orig_len = buf->len; |
| 71 | |
| 72 | assert_sane_strbuf(buf); |
| 73 | strbuf_addch(buf, ch); |
| 74 | assert_sane_strbuf(buf); |
| 75 | cl_assert_equal_i(buf->len, orig_len + 1); |
| 76 | cl_assert(buf->alloc >= orig_alloc); |
| 77 | cl_assert(buf->buf[buf->len] == '\0'); |
| 78 | } |
| 79 | |
| 80 | static void t_addstr(struct strbuf *buf, const void *data) |
| 81 | { |
nothing calls this directly
no test coverage detected