AssertFailure Type
Structured information describing one failed assertion.
Testify fills this record when an Assert operation does not satisfy its expectation.
The values are already formatted for diagnostics and report rendering.
Record fields
| Record Field |
Description
|
Full Usage:
Actual
Field type: string
|
The rendered observed value or exception.
|
|
Structured metadata describing the observed value or exception.
|
Full Usage:
Because
Field type: string option
|
An optional explanation describing why the assertion failed.
|
|
Optional structured nested details used by the rich failure renderer.
|
Full Usage:
Expected
Field type: string
|
The human-readable expectation description shown in failure output.
|
|
Structured metadata describing the expected observation when Testify can recover it.
|
Full Usage:
Label
Field type: string
|
The stable expectation label, such as
|
|
The most relevant source location that Testify could recover for the failure.
|
Full Usage:
Test
Field type: string
|
The rendered test expression or explicit label that was checked.
|
testify