Browse Source
Any additional statements after the statement that is expected to throw will never be executed in a passing test. This can lead to inappropriately passing tests where later incorrect assertions are skipped by the thrown exception. See [1] for examples. There are no cases of this in the code base, but by enabling the checker with severity ERROR we can ensure that we don't overlook any future misuse of ExpectedException. [1] http://errorprone.info/bugpattern/ExpectedExceptionChecker Change-Id: I266d4f73f6075bfc1e39fa3d8aee7dee96db61b9 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>stable-5.1
David Pursehouse
6 years ago
1 changed files with 3 additions and 0 deletions
Loading…
Reference in new issue