Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.0
-
Fix Version/s: None
-
Component/s: JMock 1.x.x Library
-
Labels:None
-
Environment:Java 1.4
JUnit 3.8.2
-
Number of attachments :
Description
In org.jmock.core.VerifyingTestCase
/* This is virtually a copy/paste of the same invokedMethod in the TestCase class to allow
- overriding of runTest in the normal manner.
* - @see junit.framework.TestCase#runBare()
*/
public void runBare() throws ThrowableUnknown macro: { setUp(); try { runTest(); verify(); } finally { tearDown(); } }
Exception appen in text was lost on try (no catch no throw). In super method junit.framework.TestCase.runBare() there is :
/**
- Runs the bare test sequence.
- @exception Throwable if any exception is thrown
*/
public void runBare() throws Throwable {
Throwable exception= null;
setUp();
try { runTest(); } catch (Throwable running) { exception= running; }
finallyUnknown macro: { try { tearDown(); } catch (Throwable tearingDown) { if (exception == null) exception= tearingDown; } }
if (exception != null) throw exception;
}
And here it's take care of test Exception.