Browse Source

Make sure you do not compare apples to oranges

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271286 13f79535-47bb-0310-9956-ffa450edef68
master
Stephane Bailliez 23 years ago
parent
commit
8c68d48649
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/formatter/XMLFormatter.java

+ 3
- 1
proposal/sandbox/junit/src/main/org/apache/tools/ant/taskdefs/optional/rjunit/formatter/XMLFormatter.java View File

@@ -211,7 +211,9 @@ public class XMLFormatter extends BaseStreamFormatter {
String name = JUnitHelper.getTestName(evt.getName());
test.setAttribute(ATTR_NAME, name);
String suiteName = JUnitHelper.getSuiteName(evt.getName());
if ( !suiteName.equals(lastSuiteElement.getAttribute("name")) ){
String lastSuiteName = lastSuiteElement.getAttribute(ATTR_PACKAGE)
+ "." + lastSuiteElement.getAttribute(ATTR_NAME);
if ( !suiteName.equals(lastSuiteName) ){
throw new BuildException("Received testcase from test "
+ suiteName + " and was expecting "
+ lastSuiteElement.getAttribute("name"));


Loading…
Cancel
Save