in src/main/org/apache/ant/antunit/AntUnit.java [245:266]
public void execute() {
if (buildFiles == null) {
throw new BuildException(ERROR_NO_TESTS);
}
if (classpath != null && classpath.size() > 0) {
subprojectCoreLoader = getProject().createClassLoader(classpath);
}
doResourceCollection(buildFiles);
if (failures > 0 || errors > 0) {
if (errorProperty != null) {
getProject().setNewProperty(errorProperty, "true");
}
if (failOnError) {
throw new BuildException(ERROR_TESTS_FAILED
+ failures + " failure"
+ (failures != 1 ? "s" : "")
+ " and "
+ errors + " error"
+ (errors != 1 ? "s" : ""));
}
}
}