Nice/src/nice/tools/unit listener.nice,1.1,1.2 api.nice,1.3,1.4
Daniel Bonniot <[email protected]>
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/nice/Nice/src/nice/tools/unit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7228/src/nice/tools/unit
Modified Files:
listener.nice api.nice
Log Message:
Print correct source file and line numbers in niceunit (#1096734).
Index: api.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/api.nice,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** api.nice 24 Feb 2005 15:11:00 -0000 1.3
--- api.nice 24 Feb 2005 16:38:23 -0000 1.4
***************
*** 34,38 ****
public boolean iterLocations
! (String testName, Throwable t, (?String, String, int)->void handleLocation)
{
let stack = nice.tools.util.JDK.getStackTrace(t);
--- 34,39 ----
public boolean iterLocations
! (String testName, Throwable t, (?String, String, int)->void handleLocation,
! ClassLoader loader)
{
let stack = nice.tools.util.JDK.getStackTrace(t);
***************
*** 46,51 ****
String method = nice.tools.util.JDK.stackMethodName(stackTraceElement);
String className = nice.tools.util.JDK.stackClassName(stackTraceElement);
! int lineNumber = nice.tools.util.JDK.stackLineNumber(stackTraceElement);
! handleLocation(file, method, lineNumber);
// We stop when we reach the start of the test. Going deeper
// only shows the internals of the test engine, which are not
--- 47,53 ----
String method = nice.tools.util.JDK.stackMethodName(stackTraceElement);
String className = nice.tools.util.JDK.stackClassName(stackTraceElement);
! int line = nice.tools.util.JDK.stackLineNumber(stackTraceElement);
! (file, line) = getSourceLocation(className, line, loader) || (file,line);
! handleLocation(file, method, line);
// We stop when we reach the start of the test. Going deeper
// only shows the internals of the test engine, which are not
***************
*** 73,77 ****
{
let cause = e.getTargetException();
! listener.failure(name, cause);
}
finally
--- 75,79 ----
{
let cause = e.getTargetException();
! listener.failure(name, cause, m.getDeclaringClass().getClassLoader());
}
finally
Index: listener.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/listener.nice,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** listener.nice 18 Feb 2004 16:33:25 -0000 1.1
--- listener.nice 24 Feb 2005 16:38:23 -0000 1.2
***************
*** 5,8 ****
void start(String test);
void end(String test);
! void failure(String test, Throwable cause);
}
--- 5,8 ----
void start(String test);
void end(String test);
! void failure(String test, Throwable cause, ClassLoader loader);
}
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click