Skip to content

Commit 911fe63

Browse files
Merge pull request #299 from google:fix-docs-test-return-type
PiperOrigin-RevId: 561941052
2 parents 6e5405d + aee971a commit 911fe63

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

googletest/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ use internal::test_outcome::{TestAssertionFailure, TestOutcome};
6262

6363
/// A `Result` whose `Err` variant indicates a test failure.
6464
///
65-
/// All test functions should return `Result<()>`.
65+
/// The assertions [`verify_that!`][crate::verify_that],
66+
/// [`verify_pred!`][crate::verify_pred], and [`fail!`][crate::fail] evaluate
67+
/// to `Result<()>`. A test function may return `Result<()>` in combination with
68+
/// those macros to abort immediately on assertion failure.
6669
///
6770
/// This can be used with subroutines which may cause the test to fatally fail
6871
/// and which return some value needed by the caller. For example:

0 commit comments

Comments
 (0)