/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError e) { fFailures.add(new TestFailure(test, e)); for (TestListener each : cloneListeners()) { each.addFailure(test, e); } }
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError t) { fFailures.add(new TestFailure(test, t)); for (TestListener each : cloneListeners()) { each.addFailure(test, t); } }
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError t) { fFailures.add(new TestFailure(test, t)); for (TestListener each : cloneListeners()) { each.addFailure(test, t); } }
@Override public void addFailure(final Test test, final AssertionFailedError t) { testListener.addFailure(test, t); } @SuppressWarnings("unused")
@Override public void addFailure(Test test, AssertionFailedError assertionFailedError) { wrapped.addFailure(test, assertionFailedError); }
@SuppressWarnings("unused") public void addFailure(final Test test, final Throwable t) { // pre-3.4 if (t instanceof AssertionFailedError) { testListener.addFailure(test, (AssertionFailedError) t); } else { testListener.addError(test, t); } } @Override
public synchronized void addFailure(Test test, AssertionFailedError t) { super.addFailure(test, t); recorderProxy.addFailure(test,t); }
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError t) { fFailures.addElement(new TestFailure(test, t)); for (Enumeration e= cloneListeners().elements(); e.hasMoreElements(); ) { ((TestListener)e.nextElement()).addFailure(test, t); } } /**
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError t) { fFailures.addElement(new TestFailure(test, t)); for (Enumeration e= cloneListeners().elements(); e.hasMoreElements(); ) { ((TestListener)e.nextElement()).addFailure(test, t); } } /**
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError t) { fFailures.addElement(new TestFailure(test, t)); for (Enumeration e= cloneListeners().elements(); e.hasMoreElements(); ) { ((TestListener)e.nextElement()).addFailure(test, t); } } /**
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError t) { fFailures.addElement(new TestFailure(test, t)); for (Enumeration e= cloneListeners().elements(); e.hasMoreElements(); ) { ((TestListener)e.nextElement()).addFailure(test, t); } } /**
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError t) { fFailures.add(new TestFailure(test, t)); for (TestListener each : cloneListeners()) { each.addFailure(test, t); } }
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError e) { fFailures.add(new TestFailure(test, e)); for (TestListener each : cloneListeners()) { each.addFailure(test, e); } }
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError t) { fFailures.add(new TestFailure(test, t)); for (TestListener each : cloneListeners()) { each.addFailure(test, t); } }
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError e) { fFailures.add(new TestFailure(test, e)); for (TestListener each : cloneListeners()) { each.addFailure(test, e); } }
/** * Adds a failure to the list of failures. The passed in exception * caused the failure. */ public synchronized void addFailure(Test test, AssertionFailedError t) { fFailures.add(new TestFailure(test, t)); for (TestListener each : cloneListeners()) { each.addFailure(test, t); } }
@Override public void addError(final Test test, final Throwable t) { if (junit4 && t instanceof AssertionFailedError) { // JUnit 4 does not distinguish between errors and failures // even in the JUnit 3 adapter. // So we need to help it a bit to retain compatibility for JUnit 3 tests. testListener.addFailure(test, (AssertionFailedError) t); } else if (junit4 && t instanceof AssertionError) { // Not strictly necessary but probably desirable. // JUnit 4-specific test GUIs will show just "failures". // But Ant's output shows "failures" vs. "errors". // We would prefer to show "failure" for things that logically are. final String msg = t.getMessage(); final AssertionFailedError failure = msg != null ? new AssertionFailedError(msg) : new AssertionFailedError(); failure.initCause(t.getCause()); failure.setStackTrace(t.getStackTrace()); testListener.addFailure(test, failure); } else { testListener.addError(test, t); } } @Override