final boolean failed = fail || (null != thrown);
IMessage.Kind kind = (failed ? IMessage.FAIL : IMessage.INFO);
IMessage m = new Message(message, kind, thrown, null);
- final boolean handled = messageHandler.handleMessage(m);
+ /*final boolean handled = */messageHandler.handleMessage(m);
}
// private static void resofhandle(String message, Throwable thrown, boolean fail) {
// /* If FAIL and the message handler returns false (normally),
import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.DateFormat;
-import java.util.Collection;
+//import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import org.apache.tools.ant.Target;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.Delete;
-import org.apache.tools.ant.taskdefs.ExecTask;
+//import org.apache.tools.ant.taskdefs.ExecTask;
import org.apache.tools.ant.taskdefs.Java;
import org.apache.tools.ant.taskdefs.LogOutputStream;
import org.apache.tools.ant.taskdefs.Mkdir;
private Stats ajdocStats = new Stats();
private Stats ajcStats = new Stats();
private Stats runStats = new Stats();
- private Stats errorStats = new Stats();
+// private Stats errorStats = new Stats();
private static final String NO_TESTID = "NONE";
private File workingdir = new File("ajworkingdir"); //XXX
// class Run
// todo: need to run in a wrapper which report non-zero int on exception
// todo: unused method? see executeJava above.
- private int java(String classname, Collection args) throws BuildException {
- Java java = (Java)project.createTask("java");
- java.setClassname(classname);
- for (Iterator i = args.iterator(); i.hasNext();) {
- Object o = i.next();
- Commandline.Argument arg = java.createArg();
- if (o instanceof File) {
- arg.setFile((File)o);
- } else if (o instanceof Path) {
- arg.setPath((Path)o);
- } else {
- arg.setValue(o+"");
- }
- }
- return java.executeJava();
- }
+// private int java(String classname, Collection args) throws BuildException {
+// Java java = (Java)project.createTask("java");
+// java.setClassname(classname);
+// for (Iterator i = args.iterator(); i.hasNext();) {
+// Object o = i.next();
+// Commandline.Argument arg = java.createArg();
+// if (o instanceof File) {
+// arg.setFile((File)o);
+// } else if (o instanceof Path) {
+// arg.setPath((Path)o);
+// } else {
+// arg.setValue(o+"");
+// }
+// }
+// return java.executeJava();
+// }
private static List allErrors = new Vector();
private List errors = new Vector();
}
/** implement invocation of ajc */
- private void java(Testset testset, List args) throws BuildException {
- Java java = (Java)project.createTask("java");
- java.setClassname("org.aspectj.tools.ajc.Main");
- if (classpath != null) {
- java.setClasspath(classpath);
- }
- for (Iterator iter = args.iterator(); iter.hasNext();) {
- Arg arg = (Arg)iter.next();
- if (arg.isj) {
- java.createJvmarg().setValue(arg.name);
- if (!arg.value.equals("")) {
- java.createJvmarg().setValue(arg.value);
- }
- }
- }
- for (Iterator iter = args.iterator(); iter.hasNext();) {
- Arg arg = (Arg)iter.next();
- if (!arg.isj) {
- java.createArg().setValue(arg.name);
- if (!arg.value.equals("")) {
- java.createArg().setValue(arg.value);
- }
- }
- }
- for (Iterator iter = testset.files.iterator(); iter.hasNext();) {
- java.createArg().setFile((File)iter.next());
- }
- for (Iterator iter = testset.argfiles.iterator(); iter.hasNext();) {
- java.createArg().setValue("-argfile");
- java.createArg().setFile((File)iter.next());
- }
- java.setFork(true);
- java.execute();
- }
-
- private void exec(Testset testset, List args) throws BuildException {
- ExecTask exec = (ExecTask)project.createTask("exec");
- exec.setExecutable("java");
- if (classpath != null) {
- exec.createArg().setValue("-classpath");
- exec.createArg().setPath(classpath);
- }
- for (Iterator iter = args.iterator(); iter.hasNext();) {
- Arg arg = (Arg)iter.next();
- if (arg.isj) {
- exec.createArg().setValue(arg.name);
- if (!arg.value.equals("")) {
- exec.createArg().setValue(arg.value);
- }
- }
- }
- exec.createArg().setValue("org.aspectj.tools.ajc.Main");
- for (Iterator iter = args.iterator(); iter.hasNext();) {
- Arg arg = (Arg)iter.next();
- if (!arg.isj) {
- exec.createArg().setValue(arg.name);
- if (!arg.value.equals("")) {
- exec.createArg().setValue(arg.value);
- }
- }
- }
- for (Iterator iter = testset.files.iterator(); iter.hasNext();) {
- exec.createArg().setFile((File)iter.next());
- }
- for (Iterator iter = testset.argfiles.iterator(); iter.hasNext();) {
- exec.createArg().setValue("-argfile");
- exec.createArg().setFile((File)iter.next());
- }
- exec.execute();
- }
-
+// private void java(Testset testset, List args) throws BuildException {
+// Java java = (Java)project.createTask("java");
+// java.setClassname("org.aspectj.tools.ajc.Main");
+// if (classpath != null) {
+// java.setClasspath(classpath);
+// }
+// for (Iterator iter = args.iterator(); iter.hasNext();) {
+// Arg arg = (Arg)iter.next();
+// if (arg.isj) {
+// java.createJvmarg().setValue(arg.name);
+// if (!arg.value.equals("")) {
+// java.createJvmarg().setValue(arg.value);
+// }
+// }
+// }
+// for (Iterator iter = args.iterator(); iter.hasNext();) {
+// Arg arg = (Arg)iter.next();
+// if (!arg.isj) {
+// java.createArg().setValue(arg.name);
+// if (!arg.value.equals("")) {
+// java.createArg().setValue(arg.value);
+// }
+// }
+// }
+// for (Iterator iter = testset.files.iterator(); iter.hasNext();) {
+// java.createArg().setFile((File)iter.next());
+// }
+// for (Iterator iter = testset.argfiles.iterator(); iter.hasNext();) {
+// java.createArg().setValue("-argfile");
+// java.createArg().setFile((File)iter.next());
+// }
+// java.setFork(true);
+// java.execute();
+// }
+//
+// private void exec(Testset testset, List args) throws BuildException {
+// ExecTask exec = (ExecTask)project.createTask("exec");
+// exec.setExecutable("java");
+// if (classpath != null) {
+// exec.createArg().setValue("-classpath");
+// exec.createArg().setPath(classpath);
+// }
+// for (Iterator iter = args.iterator(); iter.hasNext();) {
+// Arg arg = (Arg)iter.next();
+// if (arg.isj) {
+// exec.createArg().setValue(arg.name);
+// if (!arg.value.equals("")) {
+// exec.createArg().setValue(arg.value);
+// }
+// }
+// }
+// exec.createArg().setValue("org.aspectj.tools.ajc.Main");
+// for (Iterator iter = args.iterator(); iter.hasNext();) {
+// Arg arg = (Arg)iter.next();
+// if (!arg.isj) {
+// exec.createArg().setValue(arg.name);
+// if (!arg.value.equals("")) {
+// exec.createArg().setValue(arg.value);
+// }
+// }
+// }
+// for (Iterator iter = testset.files.iterator(); iter.hasNext();) {
+// exec.createArg().setFile((File)iter.next());
+// }
+// for (Iterator iter = testset.argfiles.iterator(); iter.hasNext();) {
+// exec.createArg().setValue("-argfile");
+// exec.createArg().setFile((File)iter.next());
+// }
+// exec.execute();
+// }
+//
public void handle(Throwable t) {
log("handling " + t);
if (t != null) t.printStackTrace();
}
}
- private Object makeLoggingProxy(Class interfac) {
- return Proxy.newProxyInstance(
- interfac.getClassLoader(),
- new Class[] { interfac },
- loggingProxy);
- }
+// private Object makeLoggingProxy(Class interfac) {
+// return Proxy.newProxyInstance(
+// interfac.getClassLoader(),
+// new Class[] { interfac },
+// loggingProxy);
+// }
private Object makeProxy(Class interfac) {
return Proxy.newProxyInstance(
import org.aspectj.bridge.MessageHandler;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.testing.run.IRunIterator;
-import org.aspectj.testing.util.*;
+//import org.aspectj.testing.util.*;
import org.aspectj.testing.util.BridgeUtil;
import org.aspectj.testing.util.options.*;
import org.aspectj.testing.util.options.Option.InvalidInputException;
}
}
- /** @return null if value is null or name="{value}" otherwise */
- private String makeAttr(XMLWriter out, String name, String value) {
- if (null == value) {
- return null;
- }
- return XMLWriter.makeAttribute(name, value);
- }
-
- /** @return null if list is null or empty or name="{flattenedList}" otherwise */
- private String makeAttr(XMLWriter out, String name, List list) {
- if (LangUtil.isEmpty(list)) {
- return null;
- }
- String flat = XMLWriter.flattenList(list);
- return XMLWriter.makeAttribute(name, flat);
- }
-
+// /** @return null if value is null or name="{value}" otherwise */
+// private String makeAttr(XMLWriter out, String name, String value) {
+// if (null == value) {
+// return null;
+// }
+// return XMLWriter.makeAttribute(name, value);
+// }
+//
+// /** @return null if list is null or empty or name="{flattenedList}" otherwise */
+// private String makeAttr(XMLWriter out, String name, List list) {
+// if (LangUtil.isEmpty(list)) {
+// return null;
+// }
+// String flat = XMLWriter.flattenList(list);
+// return XMLWriter.makeAttribute(name, flat);
+// }
+//
/** @return true if writeAttributes(..) will produce any output */
protected boolean haveAttributes() {
return ((!LangUtil.isEmpty(xmlNames.descriptionName)
if (LangUtil.isEmpty(parentOptions)) {
return result;
}
- boolean haveOption = false;
+// boolean haveOption = false;
String[] parents = (String[]) parentOptions.toArray(new String[0]);
try {
result = validOptions.acceptInput(parents);
return new String[0];
}
ArrayList result = new ArrayList();
- boolean haveOption = false;
+// boolean haveOption = false;
for (int i = 0; i < validOptions.length; i++) {
String option = validOptions[i];
if (LangUtil.isEmpty(option)) {
import org.aspectj.bridge.IMessageHolder;
import org.aspectj.bridge.MessageHandler;
import org.aspectj.bridge.MessageUtil;
-import org.aspectj.bridge.IMessage.Kind;
+//import org.aspectj.bridge.IMessage.Kind;
import org.aspectj.testing.util.BridgeUtil;
import org.aspectj.testing.util.Diffs;
import org.aspectj.util.LangUtil;
import java.util.Iterator;
import java.util.List;
-import org.aspectj.bridge.*;
+//import org.aspectj.bridge.*;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.testing.run.IRunIterator;
* skip dirChanges, skip messages and do children
* (though we do children directly).
*/
- private static final XMLNames NAMES = new XMLNames(XMLNames.DEFAULT,
- null, null, null, null, "", null, "", "", true, true, false);
+// private static final XMLNames NAMES = new XMLNames(XMLNames.DEFAULT,
+// null, null, null, null, "", null, "", "", true, true, false);
File suiteDir;
public Spec() {
super(XMLNAME, false); // do not skip this even if children skip
MessageUtil.abort(status, spec.testSetup.failureReason);
return false;
}
- boolean ignoreWarnings =
- (spec.testSetup.ignoreWarningsSet
- && spec.testSetup.ignoreWarnings);
+// boolean ignoreWarnings =
+// (spec.testSetup.ignoreWarningsSet
+// && spec.testSetup.ignoreWarnings);
AjcMessageHandler handler =
new AjcMessageHandler(spec.getMessages());
handler.init();
}
/** @return true if javac is available on the classpath */
- private static boolean haveJavac() { // XXX copy/paste from JavaCWrapper.java
- Class compilerClass = null;
- try {
- compilerClass = Class.forName("com.sun.tools.javac.Main");
- } catch (ClassNotFoundException ce1) {
- try {
- compilerClass = Class.forName("sun.tools.javac.Main");
- } catch (ClassNotFoundException ce2) {
- }
- }
- return (null != compilerClass);
- }
+// private static boolean haveJavac() { // XXX copy/paste from JavaCWrapper.java
+// Class compilerClass = null;
+// try {
+// compilerClass = Class.forName("com.sun.tools.javac.Main");
+// } catch (ClassNotFoundException ce1) {
+// try {
+// compilerClass = Class.forName("sun.tools.javac.Main");
+// } catch (ClassNotFoundException ce2) {
+// }
+// }
+// return (null != compilerClass);
+// }
protected String compiler;
if (null != source) {
String sourceVersion = source.unflatten()[1];
ArrayList toAdd = new ArrayList();
- String err =
+ /*String err =*/
updateBootclasspathForSourceVersion(
sourceVersion,
spec.compiler,
boolean exists,
List pathList,
boolean doCompare) {
- boolean expectStartEarlier = true;
+// boolean expectStartEarlier = true;
return exists(label, exists, pathList,doCompare, true);
}
protected boolean exists(
boolean expectStartEarlier) {
boolean result = true;
if (!LangUtil.isEmpty(pathList)) {
- final File expDir = ((!doCompare || (null == spec.expDir))
- ? null
- : new File(baseDir, spec.expDir));
+// final File expDir = ((!doCompare || (null == spec.expDir))
+// ? null
+// : new File(baseDir, spec.expDir));
for (Iterator iter = pathList.iterator(); iter.hasNext();) {
final String entry = (String) iter.next() ;
String path = entry ;
//final String baseDir = reader.getFile().getParent();
String line;
String[] words;
- boolean isRequired = true;
+// boolean isRequired = true;
final int startLine = reader.getLineNumber() - 1;
J2SE14_RTJAR =
getRtJarFor(J2SE14_RTJAR_NAME, "c:/home/apps/jdk14");
- String forkSpec = getSystemProperty(FORK_NAME, null);
+// String forkSpec = getSystemProperty(FORK_NAME, null);
globalsValid =
(FileUtil.canReadFile(F_testingclient_jar)
&& FileUtil.canReadFile(F_aspectjrt_jar)
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
-import java.util.*;
+//import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+//import java.util.Collections;
+//import java.util.List;
import org.aspectj.bridge.ICommand;
-import org.aspectj.bridge.IMessage;
+//import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.testing.ajde.CompileCommand;
import org.aspectj.testing.run.IRunIterator;
MessageUtil.info(handler, "fresh not supported by compiler: " + compiler);
}
}
- final long startTime = System.currentTimeMillis();
+// final long startTime = System.currentTimeMillis();
commandResult = compiler.repeatCommand(handler);
// XXX disabled LangUtil.throwIaxIfNotAllAssignable(actualRecompiled, File.class, "recompiled");
report = true;
return result;
}
- private boolean hasFile(ArrayList changed, File f) {
- return changed.contains(f); // d
- }
+// private boolean hasFile(ArrayList changed, File f) {
+// return changed.contains(f); // d
+// }
public String toString() {
* skip staging (always true), skip badInput (irrelevant)
* do dirChanges, do messages but skip children.
*/
- private static final XMLNames NAMES = new XMLNames(XMLNames.DEFAULT,
- "", "", null, "", "classes", null, "", "", false, false, true);
-
+// private static final XMLNames NAMES = new XMLNames(XMLNames.DEFAULT,
+// "", "", null, "", "classes", null, "", "", false, false, true);
+//
/** identifies files this run owns, so {name}.{tag}.java maps to {name}.java */
String tag;
private final IMessage.Kind failureKind;
- private boolean didCleanup;
+// private boolean didCleanup;
/**
* Create a RunSpecIterator.
fail(failMessage + ": unable to get parent " + dir);
}
} else {
- File result = FileUtil.makeNewChildDir(dir, name);
+ FileUtil.makeNewChildDir(dir, name);
if (deleteContents) {
FileUtil.deleteContents(dir);
}
private static final IMessage FAIL_NORUN
= MessageUtil.fail("Null IRun parameter to Runner.run(IRun..)");
- private static final IMessage FAIL_NORUN_ITERATOR
- = MessageUtil.fail("Null IRunterator parameter to Runner.run(IRunterator...)");
+// private static final IMessage FAIL_NORUN_ITERATOR
+// = MessageUtil.fail("Null IRunterator parameter to Runner.run(IRunterator...)");
public Runner() {
}
package org.aspectj.testing.taskdefs;
-import java.awt.Frame;
+//import java.awt.Frame;
import java.io.*;
-import java.lang.reflect.*;
+//import java.lang.reflect.*;
import java.util.*;
-import java.util.List;
+//import java.util.List;
import org.apache.tools.ant.*;
import org.apache.tools.ant.Project;
}
long curTime = System.currentTimeMillis();
final long timeout = curTime + (timeoutSeconds*1000);
- final Thread thread = Thread.currentThread();
+// final Thread thread = Thread.currentThread();
final long targetQuietTime = 1000 * seconds;
int numMessages = holder.numMessages(null, true);
long numMessagesTime = curTime;
*/
public class BridgeUtil {
- private static final String INDENT = " ";
+// private static final String INDENT = " ";
/** result value when writeMessage is passed null */
private static final String NULL_MESSAGE_OUTPUT = "<null message output>";
* file:#:# - file, line, column
* file:#:#:? - file, line, column, message
*/
- SourceLocation result = null;
+// SourceLocation result = null;
if ((null == input) || (0 == input.length())) {
if (null == defaultFile) {
return null;
int line = 0;
int endLine = 0;
int column = 0;
- String message = null;
+// String message = null;
// first try line only
line = convert(input);
//col = "expecting col(number) at \"" + col + "\" in " + input;
//throw new IllegalArgumentException(col);
} else if (-1 != colon3) { // 3 colon => message
- message = input.substring(colon3+1); // do not trim message
+ input.substring(colon3+1); // do not trim message
}
}
}
}
StringBuffer result = new StringBuffer();
final String cname = LangUtil.unqualifiedClassName(superType);
- int index = 0;
+// int index = 0;
for (int i = 0; i < ra.length; i++) {
if (null == ra[i]) {
result.append(", [" + i + "] null");
String emptyUnflattened) {
throwIaxIfNull(input, "input");
final boolean haveDelim = (!isEmpty(delim));
- final boolean haveNullFlattened = (null != nullFlattened);
- final boolean escaping = (haveDelim && (null != escape));
+// final boolean haveNullFlattened = (null != nullFlattened);
+// final boolean escaping = (haveDelim && (null != escape));
if (!isEmpty(prefix)) {
if (input.startsWith(prefix)) {
input = input.substring(prefix.length());
}
StringTokenizer st = new StringTokenizer(input, delim, true);
- StringBuffer cur = new StringBuffer();
- boolean lastEndedWithEscape = false;
- boolean lastWasDelim = false;
+// StringBuffer cur = new StringBuffer();
+// boolean lastEndedWithEscape = false;
+// boolean lastWasDelim = false;
while (st.hasMoreTokens()) {
String token = st.nextToken();
System.out.println("reading " + token);
import org.aspectj.bridge.*;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.util.LangUtil;
-import org.aspectj.util.FileUtil;
+//import org.aspectj.util.FileUtil;
/**
* Quick and dirty link checker.
}
}
- private static boolean isCheckedFileType(URL url) {
- if (null == url) {
- return false;
- }
- String file = url.getFile();
- return !FileUtil.hasZipSuffix(file)
- && !file.endsWith(".pdf");
- }
+// private static boolean isCheckedFileType(URL url) {
+// if (null == url) {
+// return false;
+// }
+// String file = url.getFile();
+// return !FileUtil.hasZipSuffix(file)
+// && !file.endsWith(".pdf");
+// }
private final Messages messages;
private final HTMLEditorKit.Parser parser; // XXX untested - stateful
info("uncommentedReference", link); // XXX bug?
}
- private void addingNullLinkFrom(URL doc) {
- info("addingNullLinkFrom", doc);
- }
-
- private void noContentCheck(Link link) {
- info("noContentCheck", link);
- }
+// private void addingNullLinkFrom(URL doc) {
+// info("addingNullLinkFrom", doc);
+// }
+//
+// private void noContentCheck(Link link) {
+// info("noContentCheck", link);
+// }
private void notTextContentType(Link link) {
info("notTextContentType", link);
info("acceptingUncheckedLink", "doc=" + doc + " link=" + link);
}
- private void cantHandleRefsYet(Link link) {
- info("cantHandleRefsYet", link.url);
- }
+// private void cantHandleRefsYet(Link link) {
+// info("cantHandleRefsYet", link.url);
+// }
private void namedReferenceNotFound(String ref) {
// XXX find all references to this unfound named reference
return 1;
}
} else {
- int i = 0;
+// int i = 0;
for (int j = 0; j < children.length; j++) {
if (recurse) {
numFails += numFailures(children[j], recurse);
outDelegate = new ProxyPrintStream(System.out);
errDelegate = new ProxyPrintStream(System.err);
this.listening = listen;
- final PrintStream HIDE = NullPrintStream.NULL_PrintStream;
+// final PrintStream HIDE = NullPrintStream.NULL_PrintStream;
outSniffer = new StreamSniffer(outDelegate);
System.setOut(new PrintStream(outSniffer));
errSniffer = new StreamSniffer(errDelegate);
if ((null == out) || LangUtil.isEmpty(list)) {
return;
}
- int i = 0;
+// int i = 0;
final String suffix = " " + label;
final String LABEL = list.size() + suffix;
out.println("## START " + LABEL);
return Factory.class.getName() + ": " + factoryName;
}
- private void checkUnique(Option result) {
- String name = result.family + "." + result.name;
- }
+// private void checkUnique(Option result) {
+// String name = result.family + "." + result.name;
+// }
}
/**
public class Options {
/** if true, then perform extra checks to debug problems */
- private static final boolean verifying = false;
+// private static final boolean verifying = false;
private static final boolean FROZEN = true;
/**
private Option.Value firstMatch(String value) {
LangUtil.throwIaxIfNull(value, "value");
- ArrayList list = new ArrayList();
+// ArrayList list = new ArrayList();
for (Iterator iter = options.iterator(); iter.hasNext();) {
Option option = (Option) iter.next();
Option.Value result = option.acceptValue(value);
private static String resolve(Option.Value[] input, int[] matches) {
String err = null;
// seek force-off
- Option.Value forceOff = null;
+// Option.Value forceOff = null;
Option option = null;
// find and remove any force-off
for (int i = 0;(null == err) && (i < matches.length); i++) {
package org.aspectj.testing.xml;
import java.io.*;
-import java.util.Vector;
+//import java.util.Vector;
import org.apache.commons.digester.Digester;
import org.aspectj.bridge.AbortException;
* - property read-only (?)
*/
- private static final String EOL = "\n";
+// private static final String EOL = "\n";
/** presumed relative-path to dtd file for any XML files written by writeSuiteToXmlFile */
public static final String DTD_PATH = "../tests/ajcTestSuite.dtd";
* The property setter checks are redundant with tests based on
* expectedProperties().
*/
- private static void setupDigesterCompileTimeCheck() {
- if (true) { throw new Error("never invoked"); }
- AjcTest.Suite.Spec suite = new AjcTest.Suite.Spec();
- AjcTest.Spec test = new AjcTest.Spec();
-// AjcTest test = new AjcTest();
-// test.addRunSpec((AbstractRunSpec) null);
-//// test.makeIncCompilerRun((IncCompilerRun.Spec) null);
-//// test.makeJavaRun((JavaRun.Spec) null);
-// test.setDescription((String) null);
-// test.setTestBaseDirOffset((String) null);
-// test.setBugId((String) null);
-// test.setTestSourceLocation((ISourceLocation) null);
-
- CompilerRun.Spec crunSpec = new CompilerRun.Spec();
- crunSpec.addMessage((IMessage) null);
- // XXX crunSpec.addSourceLocation((ISourceLocation) null);
- crunSpec.addWrapFile((AbstractRunSpec.WrapFile) null);
- crunSpec.setOptions((String) null);
- crunSpec.setPaths((String) null);
- crunSpec.setIncludeClassesDir(false);
- crunSpec.setReuseCompiler(false);
-
- IncCompilerRun.Spec icrunSpec = new IncCompilerRun.Spec();
- icrunSpec.addMessage((IMessage) null);
- icrunSpec.setTag((String) null);
- icrunSpec.setFresh(false);
-
- JavaRun.Spec jrunspec = new JavaRun.Spec();
- jrunspec.addMessage((IMessage) null);
- jrunspec.setClassName((String) null);
- jrunspec.addMessage((IMessage) null);
- // input s.b. interpretable by Boolean.valueOf(String)
- jrunspec.setSkipTester(true);
- jrunspec.setErrStreamIsError(true);
- jrunspec.setOutStreamIsError(true);
-
- DirChanges.Spec dcspec = new DirChanges.Spec();
- dcspec.setAdded((String) null);
- dcspec.setRemoved((String) null);
- dcspec.setUpdated((String) null);
- dcspec.setDefaultSuffix((String) null);
- dcspec.setDirToken((String) null);
-
- SoftMessage m = new SoftMessage();
- m.setSourceLocation((ISourceLocation) null);
- m.setText((String) null);
- m.setKindAsString((String) null);
- m.setDetails((String) null);
-
- SoftSourceLocation sl = new SoftSourceLocation();
- sl.setFile((String) null);
- sl.setLine((String) null);
- sl.setColumn((String) null);
- sl.setEndLine((String) null);
-
- // add attribute setters to validate?
- }
+// private static void setupDigesterCompileTimeCheck() {
+// if (true) { throw new Error("never invoked"); }
+// AjcTest.Suite.Spec suite = new AjcTest.Suite.Spec();
+// AjcTest.Spec test = new AjcTest.Spec();
+//// AjcTest test = new AjcTest();
+//// test.addRunSpec((AbstractRunSpec) null);
+////// test.makeIncCompilerRun((IncCompilerRun.Spec) null);
+////// test.makeJavaRun((JavaRun.Spec) null);
+//// test.setDescription((String) null);
+//// test.setTestBaseDirOffset((String) null);
+//// test.setBugId((String) null);
+//// test.setTestSourceLocation((ISourceLocation) null);
+//
+// CompilerRun.Spec crunSpec = new CompilerRun.Spec();
+// crunSpec.addMessage((IMessage) null);
+// // XXX crunSpec.addSourceLocation((ISourceLocation) null);
+// crunSpec.addWrapFile((AbstractRunSpec.WrapFile) null);
+// crunSpec.setOptions((String) null);
+// crunSpec.setPaths((String) null);
+// crunSpec.setIncludeClassesDir(false);
+// crunSpec.setReuseCompiler(false);
+//
+// IncCompilerRun.Spec icrunSpec = new IncCompilerRun.Spec();
+// icrunSpec.addMessage((IMessage) null);
+// icrunSpec.setTag((String) null);
+// icrunSpec.setFresh(false);
+//
+// JavaRun.Spec jrunspec = new JavaRun.Spec();
+// jrunspec.addMessage((IMessage) null);
+// jrunspec.setClassName((String) null);
+// jrunspec.addMessage((IMessage) null);
+// // input s.b. interpretable by Boolean.valueOf(String)
+// jrunspec.setSkipTester(true);
+// jrunspec.setErrStreamIsError(true);
+// jrunspec.setOutStreamIsError(true);
+//
+// DirChanges.Spec dcspec = new DirChanges.Spec();
+// dcspec.setAdded((String) null);
+// dcspec.setRemoved((String) null);
+// dcspec.setUpdated((String) null);
+// dcspec.setDefaultSuffix((String) null);
+// dcspec.setDirToken((String) null);
+//
+// SoftMessage m = new SoftMessage();
+// m.setSourceLocation((ISourceLocation) null);
+// m.setText((String) null);
+// m.setKindAsString((String) null);
+// m.setDetails((String) null);
+//
+// SoftSourceLocation sl = new SoftSourceLocation();
+// sl.setFile((String) null);
+// sl.setLine((String) null);
+// sl.setColumn((String) null);
+// sl.setEndLine((String) null);
+//
+// // add attribute setters to validate?
+// }
/** top element on Digester stack holds the test suite */
public static class SuiteHolder {
* The property setter checks are redundant with tests based on
* expectedProperties().
*/
- private static void setupDigesterCompileTimeCheck() {
- if (true) { throw new Error("never invoked"); }
-
- MessageListHolder holder = new MessageListHolder();
- MessageList ml = new MessageList();
- SoftMessage m = new SoftMessage();
- SoftSourceLocation sl = new SoftSourceLocation();
-
- holder.setMessageList(ml);
- ml.addMessage((IMessage) null);
- m.setSourceLocation(sl);
- m.setText((String) null);
- m.setKindAsString((String) null);
-
- sl.setFile((String) null);
- sl.setLine((String) null);
- sl.setColumn((String) null);
- sl.setEndLine((String) null);
-
- // add attribute setters to validate?
- }
+// private static void setupDigesterCompileTimeCheck() {
+// if (true) { throw new Error("never invoked"); }
+//
+// MessageListHolder holder = new MessageListHolder();
+// MessageList ml = new MessageList();
+// SoftMessage m = new SoftMessage();
+// SoftSourceLocation sl = new SoftSourceLocation();
+//
+// holder.setMessageList(ml);
+// ml.addMessage((IMessage) null);
+// m.setSourceLocation(sl);
+// m.setText((String) null);
+// m.setKindAsString((String) null);
+//
+// sl.setFile((String) null);
+// sl.setLine((String) null);
+// sl.setColumn((String) null);
+// sl.setEndLine((String) null);
+//
+// // add attribute setters to validate?
+// }
// inner classes, to make public for bean utilities
/** a list of messages */
import java.io.File;
import java.util.ArrayList;
-import java.util.Collections;
+//import java.util.Collections;
import java.util.Iterator;
import java.util.List;
if (!LangUtil.isEmpty(extras)) {
out.endAttributes();
for (Iterator iter = extras.iterator(); iter.hasNext();) {
- ISourceLocation element = (ISourceLocation) iter.next();
+ /*ISourceLocation element = (ISourceLocation)*/ iter.next();
SoftSourceLocation.writeXml(out, sl);
}
}
* @throws IllegalStateException if start element does not match
*/
public void endElement(String name) {
- int level = stack.size();
+// int level = stack.size();
String err = null;
StackElement element = null;
if (0 == stack.size()) {
// }
public static void sameIAjcRun(IAjcRun lhs, IAjcRun rhs, Assert reporter) {
- Assert a = reporter;
+// Assert a = reporter;
assertTrue(lhs != null);
assertTrue(rhs != null);
Class c = lhs.getClass();
assertTrue(spec != null);
AbstractRunSpec.RT parentRuntime = new AbstractRunSpec.RT();
String result;
- String expResult;
+// String expResult;
if (null != arg) {
parentRuntime.setOptions(new String[] { arg });
String resultContains =
!expectPass ? null : "[-" + name + ", 1." + i;
String messagesContain = expectedErr;
- MessageHandler handler =
+ /*MessageHandler handler =*/
runTest(
specOptions,
globalOptions,
dummyReports.add("run: " + Arrays.asList(args));
}
- private static void dummyRepeating(String[] args) {
- dummyReports.add("repeat: " + Arrays.asList(args));
- }
+// private static void dummyRepeating(String[] args) {
+// dummyReports.add("repeat: " + Arrays.asList(args));
+// }
private File testBaseDir;
}
public void testExtDirs() {
- String[] globals = null;
+// String[] globals = null;
CompilerRun.Spec spec = new CompilerRun.Spec();
spec.setExtdirs("one,two");
spec.setFiles("Foo.java");
System.out.println(test);
- List ret = new ArrayList();
+// List ret = new ArrayList();
NodeList children = node.getChildNodes();
for (int i=0; i < children.getLength(); i++) {
String kind = node.getNodeName();
if (kind.equals("compile")) {
List args = parseChildrenStrings(node, "arg");
- List files = parseChildrenStrings(node, "file");
+ /*List files = */parseChildrenStrings(node, "file");
List expectedMessages = parseChildrenMessages(node);
CompilerRun.Spec spec = new CompilerRun.Spec();
spec.addOptions((String[]) args.toArray(new String[0]));
JavaRun.Spec spec = new JavaRun.Spec();
spec.className = getAttributeString(node, "class");
spec.addOptions(new String[0]); //??? could add support here
- JavaRun run = new JavaRun(spec);
+ /*JavaRun run = */new JavaRun(spec);
return spec;
}
final long waitBetweenAdds = interval * 1000l;
long curTime = System.currentTimeMillis();
final long timeout = curTime + MAX_MILLIS;
- final Thread thread = Thread.currentThread();
+// final Thread thread = Thread.currentThread();
int numAdded = 0;
while (!stop && (timeout > curTime)
&& (numAdded < numToAdd)) {
public void skiptestUnflatten() {
- LangUtil.FlattenSpec COMMA = LangUtil.FlattenSpec.COMMA;
+// LangUtil.FlattenSpec COMMA = LangUtil.FlattenSpec.COMMA;
LangUtil.FlattenSpec LIST = LangUtil.FlattenSpec.LIST;
FTest[] tests = new FTest[]
options);
}
- private Values getValues(String[] input, Options options) {
- return getValuesNegative(input, null, options);
- }
+// private Values getValues(String[] input, Options options) {
+// return getValuesNegative(input, null, options);
+// }
private Values getValues(String[] input) {
return getValuesNegative(input, null);
return OPTIONS;
}
- private boolean verbose;
+// private boolean verbose;
private OptionChecker localOptionChecker;
public void testDebugCase() {
import java.util.ArrayList;
import java.util.Iterator;
-import junit.framework.*;
+//import junit.framework.*;
import junit.framework.TestCase;
import org.aspectj.testing.harness.bridge.AjcSpecTest;
/** test that all AjcSpecXmlReader.me.expectedProperties() are bean-writable */
public void testBeanInfo() throws IntrospectionException {
- AjcSpecXmlReader me = AjcSpecXmlReader.getReader();
+// AjcSpecXmlReader me = AjcSpecXmlReader.getReader();
AjcSpecXmlReader.BProps[] expected
= AjcSpecXmlReader.expectedProperties();
PropertyDescriptor[] des;