Skip to content

Commit

Permalink
Fix typos in MissingFail.md
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 694473171
  • Loading branch information
graememorgan authored and Error Prone Team committed Nov 8, 2024
1 parent 04308ea commit 6f6a638
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/bugpattern/MissingFail.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
When testing for exceptions in junit, it is easy to forget the call to `fail()`:
When testing for exceptions in JUnit, it is easy to forget the call to `fail()`:

```java
try {
Expand All @@ -16,7 +16,7 @@ import static org.junit.Assert.fail;

try {
someOperationThatShouldThrow();
fail()
fail();
} catch (SomeException expected) {
assertThat(expected).hasMessage("Operation failed");
}
Expand Down Expand Up @@ -81,5 +81,5 @@ characteristics are present:

* A field assignment in the catch block.
* A call to `assertTrue/False(boolean variable or field)` in the catch block.
* The last statement in the `try` block is an `assert*()` (that is not a noop:
`assertFalse(false)`, `assertTrue(true))` or `Mockito.verify()` call.
* The last statement in the `try` block is an `assert*()` (that is not a
noop): `assertFalse(false)`, `assertTrue(true))` or `Mockito.verify()` call.

0 comments on commit 6f6a638

Please sign in to comment.