Index files, assert edge_type appears >= floor times. * is_green=1: this is a green guard (regression if it fails). * is_green=0: this is a red reproduction (correct outcome asserted; fails until fixed). */
| 156 | * is_green=1: this is a green guard (regression if it fails). |
| 157 | * is_green=0: this is a red reproduction (correct outcome asserted; fails until fixed). */ |
| 158 | static int mkc_edge(const MKC_File *files, int nfiles, const char *edge_type, int floor, |
| 159 | const char *label, int is_green) { |
| 160 | MKC_Proj lp; |
| 161 | cbm_store_t *store = mkc_index(&lp, files, nfiles); |
| 162 | int got = store ? cbm_store_count_edges_by_type(store, lp.project, edge_type) : -1; |
| 163 | if (got < floor) { |
| 164 | fprintf(stderr, " [MKC] %s FAIL %s=%d expected>=%d %s\n", label, edge_type, got, floor, |
| 165 | is_green ? "(GREEN regression)" : "(RED reproduction — bug)"); |
| 166 | mkc_diag(store, lp.project, label); |
| 167 | } else if (!is_green) { |
| 168 | fprintf(stderr, |
| 169 | " [MKC] %s UNEXPECTED PASS %s=%d " |
| 170 | "(bug may be fixed — promote to GREEN)\n", |
| 171 | label, edge_type, got); |
| 172 | } |
| 173 | mkc_cleanup(&lp, store); |
| 174 | return got >= floor; |
| 175 | } |
| 176 | |
| 177 | /* ══════════════════════════════════════════════════════════════════════════ |
| 178 | * ═══ CLASS C1: CONSTRUCTOR / INSTANTIATION ═══════════════════════════════ |
no test coverage detected