* assert_strategy_absent — assert a given strategy tag NEVER surfaces on any * CALLS edge. Used for the bare "lsp_ts" probe: the default fallback tag is * never emitted as a distinct strategy (every concrete site passes a literal * "lsp_ts_*"), and the fixture is an UNRESOLVED call (no "lsp_ts_*" edge to * substring-alias against), so its absence is the accurate, intended invariant. * Returns
| 224 | * Returns 0 on PASS (tag absent), non-zero on FAIL (tag unexpectedly present). |
| 225 | */ |
| 226 | static int assert_strategy_absent(const char *filename, const char *src, |
| 227 | const char *strategy) { |
| 228 | RProj lp; |
| 229 | cbm_store_t *store = rh_index(&lp, filename, src); |
| 230 | if (!store) { |
| 231 | printf(" %sFAIL%s %s:%d: index failed for absent-strategy %s\n", tf_red(), |
| 232 | tf_reset(), __FILE__, __LINE__, strategy); |
| 233 | rh_cleanup(&lp, store); |
| 234 | return 1; |
| 235 | } |
| 236 | int rc = 0; |
| 237 | if (inv_edge_has_strategy(store, lp.project, strategy)) { |
| 238 | printf(" %sFAIL%s %s:%d: strategy %s unexpectedly PRESENT on a CALLS " |
| 239 | "edge (expected ABSENT — bare fallback tag is never emitted)\n", |
| 240 | tf_red(), tf_reset(), __FILE__, __LINE__, strategy); |
| 241 | rc = 1; |
| 242 | } |
| 243 | rh_cleanup(&lp, store); |
| 244 | return rc; |
| 245 | } |
| 246 | |
| 247 | /* ── Fixtures ──────────────────────────────────────────────────────────────── |
| 248 | * |
no test coverage detected