| 51 | } |
| 52 | |
| 53 | bool te_fallback(te_ctx_t *c, cbm_test_result_fallback_t code, const char *diagnostic) { |
| 54 | te_note(c, diagnostic); |
| 55 | for (int i = 0; i < c->fallback_count; i++) { |
| 56 | if (c->fallbacks[i] == code) { |
| 57 | return true; |
| 58 | } |
| 59 | } |
| 60 | if (!te_grow((void **)&c->fallbacks, &c->fallback_cap, c->fallback_count, |
| 61 | sizeof(*c->fallbacks))) { |
| 62 | return te_oom(c); |
| 63 | } |
| 64 | c->fallbacks[c->fallback_count++] = code; |
| 65 | return true; |
| 66 | } |
| 67 | |
| 68 | /* ── git ─────────────────────────────────────────────────────────── */ |
| 69 |
no test coverage detected