peterreilly 2005/01/06 02:36:38
Modified: src/main/org/apache/tools/ant/taskdefs/optional/junit
BriefJUnitResultFormatter.java
Log:
javadoc
Revision Changes Path
1.18 +23 -0
ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java
Index: BriefJUnitResultFormatter.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- BriefJUnitResultFormatter.java 6 Jan 2005 10:30:05 -0000 1.17
+++ BriefJUnitResultFormatter.java 6 Jan 2005 10:36:38 -0000 1.18
@@ -69,6 +69,9 @@
*/
private String systemError = null;
+ /**
+ * Constructor for BriefJUnitResultFormatter.
+ */
public BriefJUnitResultFormatter() {
results = new StringWriter();
resultWriter = new PrintWriter(results);
@@ -76,16 +79,23 @@
/**
* Sets the stream the formatter is supposed to write its results to.
+ * @param out the output stream to write to
*/
public void setOutput(OutputStream out) {
this.out = out;
output = new PrintWriter(out);
}
+ /**
+ * @see JUnitResultFormatter#setSystemOutput(String)
+ */
public void setSystemOutput(String out) {
systemOutput = out;
}
+ /**
+ * @see JUnitResultFormatter#setSystemError(String)
+ */
public void setSystemError(String err) {
systemError = err;
}
@@ -162,12 +172,14 @@
/**
* A test started.
+ * @param test a test
*/
public void startTest(Test test) {
}
/**
* A test ended.
+ * @param test a test
*/
public void endTest(Test test) {
}
@@ -176,6 +188,8 @@
* Interface TestListener for JUnit <= 3.4.
*
* <p>A Test failed.
+ * @param test a test
+ * @param t the exception thrown by the test
*/
public void addFailure(Test test, Throwable t) {
formatError("\tFAILED", test, t);
@@ -185,6 +199,8 @@
* Interface TestListener for JUnit > 3.4.
*
* <p>A Test failed.
+ * @param test a test
+ * @param t the assertion failed by the test
*/
public void addFailure(Test test, AssertionFailedError t) {
addFailure(test, (Throwable) t);
@@ -192,6 +208,8 @@
/**
* A test caused an error.
+ * @param test a test
+ * @param error the error thrown by the test
*/
public void addError(Test test, Throwable error) {
formatError("\tCaused an ERROR", test, error);
@@ -199,6 +217,8 @@
/**
* Format the test for printing..
+ * @param test a test
+ * @return the formatted testname
*/
protected String formatTest(Test test) {
if (test == null) {
@@ -210,6 +230,9 @@
/**
* Format an error and print it.
+ * @param type the type of error
+ * @param test the test that failed
+ * @param error the exception that the test threw
*/
protected synchronized void formatError(String type, Test test,
Throwable error) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]