ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4870] New: - class cast exception when reporting test results
Date Wed, 14 Nov 2001 16:30:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4870>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4870

class cast exception when reporting test results

           Summary: class cast exception when reporting test results
           Product: Ant
           Version: 1.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: martin.brehovsky@sun.com


In XMLJUnitFormatter.java and PlainJUnitFormatter.java is a bug, which throws
ClassCastException when running tests implementing directly junit.framework.Test
interface. 

In method startTest instead of:

currentTest.setAttribute(ATTR_NAME, ((TestCase) t).name());

there should be something like this:

if (t instanceof TestCase) {
    currentTest.setAttribute(ATTR_NAME, ((TestCase) t).name());
} else {
    currentTest.setAttribute(ATTR_NAME, ("Unknown");
}


The same thing also applies to the plain text formatter.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message