test: prune duplicate tests, re-sight two blind coverage guards

Follow-up to a fan-out audit of the whole test suite (742 tests, 21
read-only assessors + synthesis). Two clusters of the audit were
actioned here; the #66 hashing-removal cohort it surfaced is left for
the #66 scope, and the RED-first doc-rot sweep is deferred.

§2 — true duplicates removed (each kept test is a strict superset or
identical fixture+assertions of the deleted one):
- ailang-check param_in_reject_message_names_allowed_set (kept the
  _renders_allowed_set_in_ailang_syntax superset)
- ailang-check cross_module_pat_ctor_typedriven_resolves (kept ct2_;
  shared cross_module_ws helper retained, 2 other callers)
- ailang-core mq1_qualified_instancedef_class_accepted (kept ct1_)
- ail e2e bool_to_str_emits_true_branch (kept the rc-stats superset)
- ail loop_recur_str adt-leg guard (the standalone heap pin owns it;
  dropped the dangling header reference too)
- ailang-check over_strict_mode_silent_when_param_is_borrow (its
  assertion is subsumed by explicit_fn_with_no_uses_is_clean; its own
  doc claimed a "borrowing body" the Lit body never provided)

§4 — meta-guards that had gone partially blind re-sighted:
- spec_drift::spec_mentions_every_def_kind now pushes Class/Instance
  exemplars and asserts their `(class `/`(instance` anchors; the
  "wait for 22b.4" exclusion was stale (anchors shipped in e809f45).
- schema_coverage now tracks Term::New (VariantTag + EXPECTED +
  visitor insert); the new_*/raw_buf_* fixtures already exercise it,
  so the "no fixture emits new" exclusion was stale.
- prose doc_wrap_widow_control_skips_when_combined_too_long was
  tautological: its 32/32/42-char words gave combined=75<=80, so
  widow control actually fired. Rebuilt the fixture (short head + two
  40-char words → combined=81>80) so it hits the real skip branch,
  and added the missing "last line stays 1 word" assertion. The
  obvious 2-word fixture does NOT work — it skips via the
  prev_words<2 branch, not the combined-over-budget branch.

ailang-check 124->121, ailang-core 55->54, e2e 102->101,
loop_recur_str 4->3; spec_drift 8 green, schema_coverage green,
prose lib 63 green.
This commit is contained in:
2026-06-02 16:59:43 +02:00
parent 426ce88d2a
commit 72d2d9c806
8 changed files with 43 additions and 203 deletions
-10
View File
@@ -3039,16 +3039,6 @@ fn bool_to_str_drop_balances_rc_stats() {
assert_eq!(live, 0, "no leaked heap-Str slabs allowed; live={live}");
}
/// stdout-smoke for the true branch — same fixture as
/// `bool_to_str_drop_balances_rc_stats` but checked here without
/// the RC-stats overhead. Pins the byte content of `ailang_bool_to_str`'s
/// "true" slab.
#[test]
fn bool_to_str_emits_true_branch() {
let out = build_and_run("bool_to_str_drop_rc.ail");
assert_eq!(out, "true\n");
}
/// stdout-smoke for the false branch. Pins the byte
/// content of `ailang_bool_to_str`'s "false" slab.
#[test]
@@ -31,10 +31,6 @@
//! `ailang_rc_stats: allocs=4 frees=1 live=3` — the three superseded Str
//! slabs (seed "x" plus two intermediate concat results) leak while
//! stdout is already correct (`xyyy`).
//!
//! This file also re-pins the boxed-ADT leg (`alloc_rc_adt_*`) as a
//! GREEN guard: the f488d31 fix must stay green while the Str leg is
//! closed — fixing Str must not regress the ADT case.
use std::path::Path;
use std::process::Command;
@@ -131,28 +127,6 @@ fn alloc_rc_str_loop_binder_replaced_by_recur_does_not_leak() {
);
}
/// GREEN guard: the boxed-ADT leg fixed in f488d31 must stay leak-clean
/// while the Str leg is closed. Fixing Str must not regress this.
#[test]
fn alloc_rc_adt_loop_binder_replaced_by_recur_stays_leak_clean() {
let (allocs, frees, live, stdout) =
build_run_stats("loop_recur_heap_binder_no_leak_pin.ail");
assert_eq!(
stdout.trim_end(),
"2",
"ADT loop result mis-built (allocs={allocs} frees={frees} live={live})"
);
assert_eq!(
live, 0,
"the f488d31 boxed-ADT recur-dec regressed: live={live} \
(allocs={allocs} frees={frees})"
);
assert_eq!(
allocs, frees,
"ADT leg alloc/free mismatch (allocs={allocs} frees={frees} live={live})"
);
}
/// mir.4 soundness, recur-arg leg: a Str loop binder whose `recur`
/// rebinds it to a fresh static LITERAL each iteration. The seed-only
/// promotion would miss this — the recur literal "reset" must also be