@@ -54,6 +54,7 @@ defmodule Kernel.ExceptionTest do
5454 assert Exception . format_mfa ( Foo , nil , 1 ) == "Foo.nil/1"
5555 assert Exception . format_mfa ( Foo , :bar , 1 ) == "Foo.bar/1"
5656 assert Exception . format_mfa ( Foo , :bar , [ ] ) == "Foo.bar()"
57+ assert Exception . format_mfa ( nil , :bar , [ ] ) == "nil.bar()"
5758 assert Exception . format_mfa ( :foo , :bar , [ 1 , 2 ] ) == ":foo.bar(1, 2)"
5859 assert Exception . format_mfa ( Foo , :"bar baz" , 1 ) == "Foo.\" bar baz\" /1"
5960 end
@@ -76,6 +77,7 @@ defmodule Kernel.ExceptionTest do
7677 test :undefined_function_message do
7778 assert UndefinedFunctionError . new . message == "undefined function"
7879 assert UndefinedFunctionError . new ( module: Foo , function: :bar , arity: 1 ) . message == "undefined function: Foo.bar/1"
80+ assert UndefinedFunctionError . new ( module: nil , function: :bar , arity: 0 ) . message == "undefined function: nil.bar/0"
7981 end
8082
8183 test :function_clause_message do
@@ -91,13 +93,13 @@ defmodule Kernel.ExceptionTest do
9193 stacktrace =
9294 try do
9395 raise "a"
94- rescue _ ->
96+ rescue _ ->
9597 [ top | _ ] = System . stacktrace
9698 top
9799 end
98100 file = to_char_list ( __FILE__ )
99101 assert { Kernel.ExceptionTest , :test_raise_preserves_the_stacktrace , _ ,
100- [ file: ^ file , line: 93 ] } = stacktrace # line is sensitive
102+ [ file: ^ file , line: 95 ] } = stacktrace # line is sensitive
101103 end
102104
103105 defp empty_tuple, do: { }
0 commit comments