@@ -10,32 +10,32 @@ defmodule Kernel.ExceptionTest do
10
10
refute is_exception ( a_list )
11
11
end
12
12
13
- test :format_entry_with_no_file_or_line do
14
- assert Exception . format_entry ( { Foo , :bar , [ 1 , 2 , 3 ] , [ ] } ) == "Foo.bar(1, 2, 3)"
15
- assert Exception . format_entry ( { Foo , :bar , [ ] , [ ] } ) == "Foo.bar()"
16
- assert Exception . format_entry ( { Foo , :bar , 1 , [ ] } ) == "Foo.bar/1"
13
+ test :format_stacktrace_entry_with_no_file_or_line do
14
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , [ 1 , 2 , 3 ] , [ ] } ) == "Foo.bar(1, 2, 3)"
15
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , [ ] , [ ] } ) == "Foo.bar()"
16
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , 1 , [ ] } ) == "Foo.bar/1"
17
17
end
18
18
19
- test :format_entry_with_file_and_line do
20
- assert Exception . format_entry ( { Foo , :bar , [ ] , [ file: 'file.ex' , line: 10 ] } ) == "file.ex:10: Foo.bar()"
21
- assert Exception . format_entry ( { Foo , :bar , [ 1 , 2 , 3 ] , [ file: 'file.ex' , line: 10 ] } ) == "file.ex:10: Foo.bar(1, 2, 3)"
22
- assert Exception . format_entry ( { Foo , :bar , 1 , [ file: 'file.ex' , line: 10 ] } ) == "file.ex:10: Foo.bar/1"
19
+ test :format_stacktrace_entry_with_file_and_line do
20
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , [ ] , [ file: 'file.ex' , line: 10 ] } ) == "file.ex:10: Foo.bar()"
21
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , [ 1 , 2 , 3 ] , [ file: 'file.ex' , line: 10 ] } ) == "file.ex:10: Foo.bar(1, 2, 3)"
22
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , 1 , [ file: 'file.ex' , line: 10 ] } ) == "file.ex:10: Foo.bar/1"
23
23
end
24
24
25
- test :format_entry_with_file_and_line_and_cwd do
26
- assert Exception . format_entry ( { Foo , :bar , [ ] , [ file: '/foo/file.ex' , line: 10 ] } , "/foo" ) == "file.ex:10: Foo.bar()"
25
+ test :format_stacktrace_entry_with_file_and_line_and_cwd do
26
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , [ ] , [ file: '/foo/file.ex' , line: 10 ] } , "/foo" ) == "file.ex:10: Foo.bar()"
27
27
end
28
28
29
- test :format_entry_with_file_no_line do
30
- assert Exception . format_entry ( { Foo , :bar , [ ] , [ file: 'file.ex' ] } ) == "file.ex: Foo.bar()"
31
- assert Exception . format_entry ( { Foo , :bar , [ ] , [ file: 'file.ex' , line: 0 ] } ) == "file.ex: Foo.bar()"
32
- assert Exception . format_entry ( { Foo , :bar , [ 1 , 2 , 3 ] , [ file: 'file.ex' ] } ) == "file.ex: Foo.bar(1, 2, 3)"
33
- assert Exception . format_entry ( { Foo , :bar , 1 , [ file: 'file.ex' ] } ) == "file.ex: Foo.bar/1"
29
+ test :format_stacktrace_entry_with_file_no_line do
30
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , [ ] , [ file: 'file.ex' ] } ) == "file.ex: Foo.bar()"
31
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , [ ] , [ file: 'file.ex' , line: 0 ] } ) == "file.ex: Foo.bar()"
32
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , [ 1 , 2 , 3 ] , [ file: 'file.ex' ] } ) == "file.ex: Foo.bar(1, 2, 3)"
33
+ assert Exception . format_stacktrace_entry ( { Foo , :bar , 1 , [ file: 'file.ex' ] } ) == "file.ex: Foo.bar/1"
34
34
end
35
35
36
- test :format_entry_with_fun do
37
- assert Exception . format_entry ( { fn ( x ) -> x end , [ 1 ] , [ ] } ) =~ % r "\( 1\) "
38
- assert Exception . format_entry ( { fn ( x , y ) -> { x , y } end , 2 , [ ] } ) =~ % r "/2"
36
+ test :format_stacktrace_entry_with_fun do
37
+ assert Exception . format_stacktrace_entry ( { fn ( x ) -> x end , [ 1 ] , [ ] } ) =~ % r "\( 1\) "
38
+ assert Exception . format_stacktrace_entry ( { fn ( x , y ) -> { x , y } end , 2 , [ ] } ) =~ % r "/2"
39
39
end
40
40
41
41
test :format_module_function_arity do
0 commit comments