mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-12-03 12:32:02 +00:00
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.
This commit is contained in:
parent
91a11cb89e
commit
f223a64bb7
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue