Skip to content

Commit c635b5f

Browse files
committed
Fix test pattern match for OTP 28
1 parent e0b1a39 commit c635b5f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

test/gamut_diagram_test.exs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,11 @@ defmodule Color.Gamut.DiagramTest do
166166
end
167167

168168
test "zero denominator guards don't crash" do
169-
assert {0.0, 0.0} = Diagram.xy_to_uv({0.0, 0.0})
170-
assert {0.0, 0.0} = Diagram.uv_to_xy({0.0, 0.0})
169+
# Use explicit +0.0 to satisfy OTP 28's signed-zero pattern
170+
# match rules; we only care that the guards return zero of
171+
# either sign rather than dividing by zero.
172+
assert {+0.0, +0.0} = Diagram.xy_to_uv({0.0, 0.0})
173+
assert {+0.0, +0.0} = Diagram.uv_to_xy({0.0, 0.0})
171174
end
172175
end
173176
end

0 commit comments

Comments
 (0)