Skip to content

Commit c71c878

Browse files
committed
Tests annotated with `@Test(expected = AssumptionViolatedException.class)` which throw AssumptionViolatedException should be marked as passing, not skipped.
1 parent 54d6e94 commit c71c878

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/junit/internal/runners/statements/ExpectException.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public void evaluate() throws Exception {
1919
next.evaluate();
2020
complete = true;
2121
} catch (AssumptionViolatedException e) {
22-
throw e;
22+
if (!expected.isAssignableFrom(e.getClass())) {
23+
throw e;
24+
}
2325
} catch (Throwable e) {
2426
if (!expected.isAssignableFrom(e.getClass())) {
2527
String message = "Unexpected exception, expected<"

0 commit comments

Comments
 (0)