From c49b703be833a980de5ef09ff5701894adf2892e Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Mon, 9 Nov 2026 21:51:53 -0500 Subject: [PATCH] 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 " 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 --- .../CuttingPlanning/ProblemNestRegressionTests.cs | 9 ++++++--- docs/problem-nests.md | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenNest.Tests/CuttingPlanning/ProblemNestRegressionTests.cs b/OpenNest.Tests/CuttingPlanning/ProblemNestRegressionTests.cs index d08b2e84..86b736b6 100644 --- a/OpenNest.Tests/CuttingPlanning/ProblemNestRegressionTests.cs +++ b/OpenNest.Tests/CuttingPlanning/ProblemNestRegressionTests.cs @@ -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."); } diff --git a/docs/problem-nests.md b/docs/problem-nests.md index 57832546..42b3bfd9 100644 --- a/docs/problem-nests.md +++ b/docs/problem-nests.md @@ -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: -`: plate 1 33 parts (baseline 33), 61.2 s`. +` plate 1: 33 parts (baseline 33), 61.2 s`, or ` 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