@@ -10,32 +10,32 @@ defmodule Kernel.ExceptionTest do
1010 refute is_exception ( a_list )
1111 end
1212
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"
1717 end
1818
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"
2323 end
2424
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()"
2727 end
2828
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"
3434 end
3535
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"
3939 end
4040
4141 test :format_module_function_arity do
0 commit comments