File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1
1
defmodule ExUnit.AssertionError do
2
2
@ moduledoc """
3
3
Raised to signal an assertion error.
4
+
5
+ This is used by macros such as `ExUnit.Assertions.assert/1`.
4
6
"""
5
7
6
8
@ no_value :ex_unit_no_meaningful_value
7
9
10
+ @ typedoc since: "1.16.0"
11
+ @ type t :: % __MODULE__ {
12
+ left: any ,
13
+ right: any ,
14
+ message: any ,
15
+ expr: any ,
16
+ args: any ,
17
+ doctest: any ,
18
+ context: any
19
+ }
20
+
8
21
defexception left: @ no_value ,
9
22
right: @ no_value ,
10
23
message: @ no_value ,
@@ -16,6 +29,7 @@ defmodule ExUnit.AssertionError do
16
29
@ doc """
17
30
Indicates no meaningful value for a field.
18
31
"""
32
+ @ spec no_value :: atom
19
33
def no_value do
20
34
@ no_value
21
35
end
@@ -31,6 +45,11 @@ defmodule ExUnit.MultiError do
31
45
Raised to signal multiple errors happened in a test case.
32
46
"""
33
47
48
+ @ typedoc since: "1.16.0"
49
+ @ type t :: % __MODULE__ {
50
+ errors: [ { Exception . kind ( ) , any , Exception . stacktrace ( ) } ]
51
+ }
52
+
34
53
defexception errors: [ ]
35
54
36
55
@ impl true
Original file line number Diff line number Diff line change @@ -418,7 +418,7 @@ defmodule ExUnit.Formatter do
418
418
419
419
"""
420
420
@ spec format_assertion_diff (
421
- % ExUnit.AssertionError { } ,
421
+ ExUnit.AssertionError . t ( ) ,
422
422
non_neg_integer ,
423
423
width ,
424
424
formatter_callback
You can’t perform that action at this time.
0 commit comments