com.sun.tdk.signaturetest.ant
Class ATest
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.sun.tdk.signaturetest.ant.ASuperBase
com.sun.tdk.signaturetest.ant.ABase
com.sun.tdk.signaturetest.ant.ATest
public class ATest
- extends ABase
Ant wrapper for test command
Required parameters:
"package" attribute or nested "package" element is required.
Corresponds to -package option
Samples -
<setup package="javax.swing" ...
or
<setup ...
<package name="javax.swing" />
<package name="java.lang" />
...
</setup>
"classpath" attribute or nested "classpath" element is required.
Corresponds to -classpath option
"filename" attribute is required.
Corresponds to -filename option
Optional parameters:
"failonerror" - Stop the build process if the command exits with an error. Default is "false".
"apiVersion" - corresponds to -apiVersion. Set API version for signature file
"backward" - corresponds to -Backward option. Performs backward compatibility checking.
Default is "false".
"binary" - corresponds to "-mode bin" option. Turns on binary mode. Default is "false".
"errorAll" - corresponds to "-errorAll" option. Handles warnings as errors. Default is "false".
"debug" - corresponds to "-debug" option, prints debug information. Default is "false".
"formatHuman" - corresponds to "-formatHuman" option, processes human readable error output.
Default is "false".
"output" - corresponds to "-out filename" option, specifies report file name
"negative" - inverts result (that is passed status treats as failed and vice versa, default is "false"
"exclude" attribute or nested "exclude" element. Corresponds to -exclude option.
package or class, which is not required to be tested
Samples -
<setup package="javax.swing" exclude="javax.swing.text.ParagraphView" ...
or
<setup ...
<exclude package="javax.swing.text" />
<exclude class="javax.swing.JTree$EmptySelectionModel" />
...
</setup>
Task definition sample:
<taskdef name="setup"
classname="com.sun.tdk.signaturetest.ant.ASetup"
classpath="sigtestdev.jar"/>
Task usage sample:
<setup package="javax.swing" failonerror="true" apiVersion="swing"
filename="javax_swing.sig">
<classpath>
<pathelement location="/opt/java/jdk1.6.0_04/jre/lib/rt.jar"/>
</classpath>
<exclude class="javax.swing.tree.DefaultTreeSelectionModel"/>
<exclude class="javax.swing.text.ParagraphView"/>
<exclude class="javax.swing.tree.DefaultTreeSelectionModel"/>
<exclude class="javax.swing.plaf.basic.BasicTextFieldUI$I18nFieldView"/>
<exclude class="javax.swing.JEditorPane$PlainEditorKit$PlainParagraph"/>
<exclude class="javax.swing.text.html.ParagraphView"/>
<exclude class="javax.swing.plaf.basic.BasicTextAreaUI$PlainParagraph"/>
<exclude class="javax.swing.JTree$EmptySelectionModel"/>
</setup>
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary |
ATest()
|
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATest
public ATest()
execute
public void execute()
throws org.apache.tools.ant.BuildException
- Overrides:
execute
in class org.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
testFactory
protected SignatureTest testFactory()
setBinary
public void setBinary(boolean b)
setBackward
public void setBackward(boolean b)
setFormatHuman
public void setFormatHuman(boolean b)
setOutput
public void setOutput(java.lang.String s)
setDebug
public void setDebug(boolean d)
setErrorAll
public void setErrorAll(boolean d)