From b13513ba1c9d698ba82797fd162df4c438435f06 Mon Sep 17 00:00:00 2001 From: Tokarzewski Date: Wed, 30 Sep 2026 10:53:35 +0200 Subject: [PATCH] tests: make batch.bad_error culture-independent Sizing error messages format numbers with the current culture, so on a comma-decimal locale the expectation '-0.1' failed (1145 passed, 1 failed). Build the expected string the same way. Suite now 1146 passed, 0 failed. Co-Authored-By: Claude Sonnet 5.5 --- csharp/Wenta.Core.Tests/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/csharp/Wenta.Core.Tests/Program.cs b/csharp/Wenta.Core.Tests/Program.cs index 8ec036d..e6a2a7a 100644 --- a/csharp/Wenta.Core.Tests/Program.cs +++ b/csharp/Wenta.Core.Tests/Program.cs @@ -2094,7 +2094,8 @@ private static void RunBatchSizing() CheckInt("batch.noise_snap", res[3].SnappedRoundMm ?? -1, 200); CheckTrue("batch.aspect_rect_snap", res[4].SnappedRectMm != null && res[4].SnappedRectMm[0] == 100 && res[4].SnappedRectMm[1] == 250); CheckTrue("batch.aspect_no_round_snap", res[4].SnappedRoundMm == null); - CheckStr("batch.bad_error", res[5].Error, "flowrate must be positive, got -0.1"); + // Sizing formats the value with the current culture (e.g. "-0,1"), so build the expectation the same way. + CheckStr("batch.bad_error", res[5].Error, "flowrate must be positive, got " + (-0.1)); CheckTrue("batch.bad_no_result", res[5].Result == null && res[5].SnappedRoundMm == null); int[] rect = BatchSizing.SnapRectangular(Standard.En1505_1506, 210.0, 260.0); CheckTrue("batch.snap_rect_up", rect != null && rect[0] == 250 && rect[1] == 300);