spec.harness.results
Class TestResult

java.lang.Object
  extended by spec.harness.results.TestResult
Direct Known Subclasses:
BenchmarkResult, IterationResult, LoopResult, SuiteResult

public abstract class TestResult
extends java.lang.Object


Field Summary
protected  java.util.List<java.lang.String> errors
           
static int ITER
           
static int TAB
           
static int TIMED
           
static java.lang.String XML_HEADER
           
 
Constructor Summary
TestResult()
           
 
Method Summary
 void addError(java.lang.String error)
           
static java.lang.String correctContent(java.lang.String content, boolean doApos)
           
static java.lang.String doubleAsRes(double d)
           
abstract  java.util.List<java.lang.String> getAllErrors(java.lang.String tag)
           
 java.util.List getErrors()
           
protected static java.lang.String getIndent(int indent)
           
static java.lang.String getRunModeDescription(int mode)
           
 boolean hasErrors()
           
abstract  boolean isValid()
          Check if result is valid.
static java.lang.String millisAsSec(long time)
           
protected  void printErrorsToXml(java.io.PrintStream ps, int indent)
           
protected  void ptxAttrib(java.io.PrintStream ps, int indent, java.lang.String name, boolean value, boolean condition, java.lang.String ending)
           
protected  void ptxAttrib(java.io.PrintStream ps, int indent, java.lang.String name, double value, boolean condition, java.lang.String ending)
           
protected  void ptxAttrib(java.io.PrintStream ps, int indent, java.lang.String name, long value, boolean condition, java.lang.String ending)
           
protected  void ptxAttrib(java.io.PrintStream ps, int indent, java.lang.String name, java.lang.String[] value, boolean condition, java.lang.String ending)
           
protected  void ptxAttrib(java.io.PrintStream ps, int indent, java.lang.String name, java.lang.String value, boolean condition, java.lang.String ending)
           
protected  void ptxElement(java.io.PrintStream ps, int indent, java.lang.String name, java.lang.String value)
           
protected  void ptxElementClose(java.io.PrintStream ps, int indent, java.lang.String name)
           
protected  void ptxElementOpen(java.io.PrintStream ps, int indent, java.lang.String name)
           
protected  void ptxElementStartOpen(java.io.PrintStream ps, int indent, java.lang.String name, boolean linebreak)
           
protected  void ptxXmlHeader(java.io.PrintStream ps)
           
abstract  void toXml(java.io.PrintStream ps, int level)
          Print result as xml on given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ITER

public static final int ITER
See Also:
Constant Field Values

TIMED

public static final int TIMED
See Also:
Constant Field Values

errors

protected java.util.List<java.lang.String> errors

TAB

public static final int TAB
See Also:
Constant Field Values

XML_HEADER

public static final java.lang.String XML_HEADER
See Also:
Constant Field Values
Constructor Detail

TestResult

public TestResult()
Method Detail

toXml

public abstract void toXml(java.io.PrintStream ps,
                           int level)
Print result as xml on given string.


isValid

public abstract boolean isValid()
Check if result is valid.


getAllErrors

public abstract java.util.List<java.lang.String> getAllErrors(java.lang.String tag)

getErrors

public java.util.List getErrors()

addError

public void addError(java.lang.String error)

hasErrors

public boolean hasErrors()

printErrorsToXml

protected void printErrorsToXml(java.io.PrintStream ps,
                                int indent)

ptxAttrib

protected void ptxAttrib(java.io.PrintStream ps,
                         int indent,
                         java.lang.String name,
                         java.lang.String value,
                         boolean condition,
                         java.lang.String ending)

ptxAttrib

protected void ptxAttrib(java.io.PrintStream ps,
                         int indent,
                         java.lang.String name,
                         long value,
                         boolean condition,
                         java.lang.String ending)

ptxAttrib

protected void ptxAttrib(java.io.PrintStream ps,
                         int indent,
                         java.lang.String name,
                         double value,
                         boolean condition,
                         java.lang.String ending)

ptxAttrib

protected void ptxAttrib(java.io.PrintStream ps,
                         int indent,
                         java.lang.String name,
                         boolean value,
                         boolean condition,
                         java.lang.String ending)

ptxAttrib

protected void ptxAttrib(java.io.PrintStream ps,
                         int indent,
                         java.lang.String name,
                         java.lang.String[] value,
                         boolean condition,
                         java.lang.String ending)

ptxElement

protected void ptxElement(java.io.PrintStream ps,
                          int indent,
                          java.lang.String name,
                          java.lang.String value)

ptxElementOpen

protected void ptxElementOpen(java.io.PrintStream ps,
                              int indent,
                              java.lang.String name)

ptxElementStartOpen

protected void ptxElementStartOpen(java.io.PrintStream ps,
                                   int indent,
                                   java.lang.String name,
                                   boolean linebreak)

ptxElementClose

protected void ptxElementClose(java.io.PrintStream ps,
                               int indent,
                               java.lang.String name)

ptxXmlHeader

protected void ptxXmlHeader(java.io.PrintStream ps)

getRunModeDescription

public static java.lang.String getRunModeDescription(int mode)

doubleAsRes

public static java.lang.String doubleAsRes(double d)

millisAsSec

public static java.lang.String millisAsSec(long time)

getIndent

protected static java.lang.String getIndent(int indent)

correctContent

public static final java.lang.String correctContent(java.lang.String content,
                                                    boolean doApos)