From f223a64bb712c1f7775ebc43bf2b223d9fdbc07c Mon Sep 17 00:00:00 2001 From: iamtoruk Date: Wed, 2 Sep 2026 06:24:28 -0700 Subject: [PATCH] test(mac): compare the pill fade start with a tolerance 100/112 is not exactly representable; the CI runner rounds the last bit differently from the dev machine and the equality failed on main. --- mac/Tests/CodeBurnMenubarTests/CapacityDockGlanceTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mac/Tests/CodeBurnMenubarTests/CapacityDockGlanceTests.swift b/mac/Tests/CodeBurnMenubarTests/CapacityDockGlanceTests.swift index 1236d60a..d01f181c 100644 --- a/mac/Tests/CodeBurnMenubarTests/CapacityDockGlanceTests.swift +++ b/mac/Tests/CodeBurnMenubarTests/CapacityDockGlanceTests.swift @@ -65,7 +65,7 @@ struct CapacityDockGlanceTests { @Test("The tint's fade tail never inverts on a short fill") func pillFadeStart() { // A long band keeps a 12pt tail, so the fade starts near its end. - #expect(CapacityDockGlance.pillFadeStart(filledWidth: 112, scale: 1) == 100.0 / 112.0) + #expect(abs(CapacityDockGlance.pillFadeStart(filledWidth: 112, scale: 1) - 100.0 / 112.0) < 1e-9) // Shorter than the tail, the whole band is the fade. #expect(CapacityDockGlance.pillFadeStart(filledWidth: 8, scale: 1) == 0) #expect(CapacityDockGlance.pillFadeStart(filledWidth: 0, scale: 1) == 0)