|
23 | 23 | //!
|
24 | 24 | //! ## Assertions and matchers
|
25 | 25 | //!
|
26 |
| -//! Most assertions are made through the macro [`verify_that!`] which evaluates |
27 |
| -//! to a [`Result<()>`]. It takes two arguments: an actual value to be tested |
28 |
| -//! and a [`Matcher`]. |
| 26 | +//! Most assertions are made through the macro [`verify_that!`]. It takes two |
| 27 | +//! arguments: an actual value to be tested and a [`Matcher`]. |
29 | 28 | //!
|
30 | 29 | //! Unlike the macros used in other test assertion libraries in Rust,
|
31 | 30 | //! `verify_that!` does not panic when the test assertion fails. Instead, it
|
32 |
| -//! evaluates to `Result`, which the caller can choose to handle by: |
| 31 | +//! evaluates to [`googletest::Result<()>`][Result], which the caller can choose |
| 32 | +//! to handle by: |
33 | 33 | //!
|
34 | 34 | //! * Returning immediately from the function with the `?` operator (a *fatal*
|
35 | 35 | //! assertion), or
|
|
107 | 107 | //! | [`empty`] | An empty collection. |
|
108 | 108 | //! | [`ends_with`] | A string ending with the given suffix. |
|
109 | 109 | //! | [`eq`] | A value equal to the argument, in the sense of the [`PartialEq`] trait. |
|
110 |
| -//! | [`err`] | A [`Result`] containing an `Err` variant the argument matches. | |
| 110 | +//! | [`err`] | A [`Result`][std::result::Result] containing an `Err` variant the argument matches. | |
111 | 111 | //! | [`field!`] | A struct or enum with a given field whose value the argument matches. |
|
112 | 112 | //! | [`ge`] | A [`PartialOrd`] value greater than or equal to the given value. |
|
113 | 113 | //! | [`gt`] | A [`PartialOrd`] value strictly greater than the given value. |
|
|
121 | 121 | //! | [`near`] | A floating point number within a given tolerance of the argument. |
|
122 | 122 | //! | [`none`] | An [`Option`] containing `None`. |
|
123 | 123 | //! | [`not`] | Any value the argument does not match. |
|
124 |
| -//! | [`ok`] | A [`Result`] containing an `Ok` variant the argument matches. | |
| 124 | +//! | [`ok`] | A [`Result`][std::result::Result] containing an `Ok` variant the argument matches. | |
125 | 125 | //! | [`or`] | Anything matched by either of the two given matchers. |
|
126 | 126 | //! | [`pat!`] | Alias for [`matches_pattern!`]. |
|
127 | 127 | //! | [`points_to`] | Any [`Deref`] such as `&`, `Rc`, etc. whose value the argument matches. |
|
|
174 | 174 | //! [`Option`]: std::option::Option
|
175 | 175 | //! [`PartialEq`]: std::cmp::PartialEq
|
176 | 176 | //! [`PartialOrd`]: std::cmp::PartialOrd
|
177 |
| -//! [`Result`]: std::result::Result |
178 | 177 | //!
|
179 | 178 | //! ## Writing matchers
|
180 | 179 | //!
|
|
0 commit comments