Skip to content

Commit 19c8a85

Browse files
hovinenbcopybara-github
authored andcommitted
Correct two mistakes in the README file.
First, the text stated that the library would not panic. This is not entirely true, since the assert_* family of macros does panic. The text now refers to just the verify_that! macro. Second, the description of the assert_that! macro was syntactically invalid and this corrects it. PiperOrigin-RevId: 505618928
1 parent 5992211 commit 19c8a85

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ Most assertions are made through the macro [`verify_that!`] which evaluates to a
3737
[`Result<()>`]. It takes two arguments: an actual value to be tested and a
3838
[`Matcher`].
3939

40-
Unlike other Rust assertion libraries, this library does not panic when a test
41-
assertion fails. Instead, a test assertion evaluates to `Result`, which the
42-
caller can choose to handle by:
40+
Unlike the macros used in other test assertion libraries in Rust, `verify_that!`
41+
does not panic when the test assertion fails. Instead, it evaluates to `Result`,
42+
which the caller can choose to handle by:
4343

4444
* Returning immediately from the function with the `?` operator (a *fatal*
4545
assertion), or
@@ -62,7 +62,8 @@ fn more_than_one_failure() -> Result<()> {
6262
```
6363

6464
> In case one wants behaviour closer to other Rust test libraries, the macro
65-
> [`assert_that!`] has the same [`verify_that!`] but panics on failure.
65+
> [`assert_that!`] has the same parameters as [`verify_that!`] but panics on
66+
> failure.
6667
6768
This library includes a rich set of matchers, covering:
6869

0 commit comments

Comments
 (0)