test(problem-nests): shape fill result lines like the planning test's

A nightly corpus runner keys every area's results by the subject before the
colon, so the fill line now reads "<nest> plate 1: 33 parts (baseline 33),
61.2 s" (strategy other than Lattice in the subject) instead of putting the
plate number in the outcome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-11-18 08:37:09 -05:00
1 parent 48af12c544
commit c49b703be8
2 files changed
+8 -4

No files matched your search

@@ -245,19 +245,22 @@ public partial class ProblemNestRegressionTests(ITestOutputHelper output)
continue;
}
// Shaped like the planning test's line, so a nightly runner parses every area alike.
var subject = strategy == PlateFillService.DefaultStrategy
? $"{name} plate {number}" : $"{name} plate {number} ({strategy})";
var watch = Stopwatch.StartNew();
var (parts, problem) = Fill(strategy, plate, drawings[0], limit);
var expected = listed ? counts[number] : (int?)null;
output.WriteLine($"{label}: plate {number} {problem ?? $"{parts} parts"} (baseline {expected?.ToString() ?? "none"}), "
output.WriteLine($"{subject}: {problem ?? $"{parts} parts"} (baseline {expected?.ToString() ?? "none"}), "
+ $"{watch.Elapsed.TotalSeconds:0.0} s");
if (problem != null)
{
failures.Add($"{label} plate {number}: {problem}");
failures.Add($"{subject}: {problem}");
continue;
}
observed[number] = parts.ToString();
if (parts < expected)
failures.Add($"{label} plate {number}: {parts} parts, worse than baseline {expected}.");
failures.Add($"{subject}: {parts} parts, worse than baseline {expected}.");
else if (parts > expected)
output.WriteLine($" better than {expected}; update the baseline.");
}
+2 -1
View File
@@ -76,7 +76,8 @@ plate's parts are removed (its cut-offs stay), and the strategy fills the plate'
the plate's one drawing at unlimited quantity, using the plate's own size, spacing, edge spacing,
quadrant and clamps as saved. Lattice fills unless the line names another strategy in
parentheses: `fill (Strip): 1=33`. Each plate prints one line:
`<nest>: plate 1 33 parts (baseline 33), 61.2 s`.
`<nest> plate 1: 33 parts (baseline 33), 61.2 s`, or `<nest> plate 1 (Strip): ...` for another
strategy, shaped like the planning test's line so a nightly runner parses every area alike.
A plate fails when it places fewer parts than its baseline, its layout breaks the layout check
(bounds, spacing, clamps), or the fill times out (the same per-plate limit as planning: 120 s, or