iter ct.4.4: compare_primitives_smoke E2E fixture (closes iter 23.3 Task 4)

This commit is contained in:
2026-05-11 10:09:48 +02:00
parent b651b1e8fc
commit ba48349052
2 changed files with 268 additions and 0 deletions
+19
View File
@@ -908,6 +908,25 @@ fn ordering_match_via_prelude_prints_1() {
assert_eq!(stdout, "1\n");
}
/// Iter 23.3 Task 4 (resumed in ct.4): the end-to-end
/// demonstration that the iter-23.1 cross-module Type::Con
/// mismatch bug is closed. `examples/compare_primitives_smoke.ail.json`
/// imports prelude, calls `compare` on three pairs each of
/// Int / Bool / Str (arranged LT / EQ / GT per type), and
/// pattern-matches the result. Expected stdout encodes the
/// 9-case decision lattice as `1\n2\n3` × 3.
///
/// Pre-canonical-type-names, the bare `Ordering` returned by
/// `compare` mismatched the qualified `prelude.Ordering`
/// scrutinee at the user-side pattern lookup. Post-milestone,
/// the scrutinee is qualified throughout, the pattern lookup
/// is type-driven, and the run completes cleanly.
#[test]
fn compare_primitives_smoke_prints_1_2_3_thrice() {
let stdout = build_and_run("compare_primitives_smoke.ail.json");
assert_eq!(stdout, "1\n2\n3\n1\n2\n3\n1\n2\n3\n");
}
/// Iter 23.2: end-to-end coverage for the auto-loaded `Eq` class
/// + three primitive instances. The fixture calls `eq` on Int /
/// Bool / Str with both an equal and an unequal pair each; the