Skip to content

Commit 73517cd

Browse files
committed
doc: document assertions for Error types in README
1 parent b48c7dc commit 73517cd

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,16 @@ for the `Result` type.
290290
| ok | verify that a result has an ok value and map the subject to this ok value |
291291
| err | verify that a result has an err value and map the subject to this err value |
292292

293+
### Error
294+
295+
for types that implement `std::error::Error`.
296+
297+
| assertion | description |
298+
|--------------------|----------------------------------------------------------------------------------------------------|
299+
| has_no_source | verify that an error has no source |
300+
| has_source | verify that an error has some source |
301+
| has_source_message | verify that an error has a source which converts to a string that is equal to the expected message |
302+
293303
### Emptiness
294304

295305
for collections and strings.

0 commit comments

Comments
 (0)