-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Elixir and Erlang/OTP versions
erlang 26.0.2
elixir 1.15.4-otp-26
Operating system
Linux
Current behavior
defmodule MyTest do
use ExUnit.Case, async: true
defmodule MyStruct do
@derive {Inspect, only: []}
defstruct [:callback_fn]
end
test "compare" do
assert %MyStruct{callback_fn: &String.to_atom/1} == %MyStruct{callback_fn: &String.unknown/1}
end
endoutput with elixir 1.15.4-otp-26: left and right are equal
1) test compare (MyTest)
test/my_test.exs:10
Assertion with == failed
code: assert %MyStruct{callback_fn: &String.to_atom/1} == %MyStruct{callback_fn: &String.unknown/1}
left: #MyTest.MyStruct<...>
right: #MyTest.MyStruct<...>
stacktrace:
test/my_test.exs:11: (test)
output with elixir 1.14.5-otp-25: left and right are different, diff highlighting is present
1) test compare (MyTest)
test/my_test.exs:10
Assertion with == failed
code: assert %MyStruct{callback_fn: &String.to_atom/1} == %MyStruct{callback_fn: &String.unknown/1}
left: %MyTest.MyStruct{callback_fn: &String.to_atom/1}
right: %MyTest.MyStruct{callback_fn: &String.unknown/1}
stacktrace:
test/my_test.exs:11: (test)
if I remove @derive {Inspect, only: []} then with elixir 1.15.4-otp-26 output is the same as with 1.14.5-otp-25 but without diff highlighting.
Expected behavior
behaviour from previous version
Metadata
Metadata
Assignees
Labels
No labels