process inheritors of comparison exceptions the same way as comparison (IDEA-95469)

(cherry picked from commit ade51bec1b667357ce4b32bf4aabe03c9d41446b)
This commit is contained in:
anna
2012-11-23 21:13:39 +01:00
parent 10cecacf14
commit 2f9355d1c0
@@ -89,8 +89,14 @@ public class JUnit4TestResultsSender extends RunListener {
private static boolean isComparisonFailure(Throwable throwable) {
if (throwable == null) return false;
final String throwableClassName = throwable.getClass().getName();
return throwableClassName.equals(JUNIT_FRAMEWORK_COMPARISON_NAME) || throwableClassName.equals(ORG_JUNIT_COMPARISON_NAME);
return isComparisonFailure(throwable.getClass());
}
private static boolean isComparisonFailure(Class aClass) {
if (aClass == null) return false;
final String throwableClassName = aClass.getName();
if (throwableClassName.equals(JUNIT_FRAMEWORK_COMPARISON_NAME) || throwableClassName.equals(ORG_JUNIT_COMPARISON_NAME)) return true;
return isComparisonFailure(aClass.getSuperclass());
}
private static boolean isAssertionError(Class throwableClass) {