Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions lib/elixir/test/elixir/protocol_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,11 @@ defmodule ProtocolTest do
assert moduledoc == %{"en" => "for map"}
end

@compile {:no_warn_undefined, WithAll}

test "protocol keeps underlying UndefinedFunctionError" do
assert_raise UndefinedFunctionError, fn ->
WithAll.ok(%ImplStruct{})
end
assert %UndefinedFunctionError{module: Unknown, function: :undefined, arity: 1} =
assert_raise(UndefinedFunctionError, fn ->
apply(Sample, :ok, [%ImplStruct{}])
end)
end

test "protocol defines callbacks" do
Expand Down