|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.crystal.tac.eclipse.EclipseTACSimpleTestDriver
public class EclipseTACSimpleTestDriver
This class makes 3-address code unit tests available as a Crystal analysis. It also provides static helper methods used by those unit tests. The preferred way of running unit tests, however, is using Eclipse's JUnit plugin test feature.
Constructor Summary | |
---|---|
EclipseTACSimpleTestDriver()
|
Method Summary | |
---|---|
void |
afterAllCompilationUnits()
Inform the analysis that all compilation units have been analyzed. |
static void |
assertMethodParameter(Variable x,
org.eclipse.jdt.core.dom.MethodDeclaration m,
int parameterIndex,
EclipseTAC tac)
|
static void |
assertOperands(List<org.eclipse.jdt.core.dom.Expression> exprs,
List<Variable> operands,
EclipseTAC tac)
|
void |
beforeAllCompilationUnits()
Inform the analysis that the analysis process is about to begin. |
static org.eclipse.jdt.core.dom.VariableDeclarationFragment |
getFirstField(org.eclipse.jdt.core.dom.CompilationUnit compUnit)
|
static org.eclipse.jdt.core.dom.MethodDeclaration |
getFirstMethod(org.eclipse.jdt.core.dom.CompilationUnit compUnit)
|
static org.eclipse.jdt.core.dom.Statement |
getLastStatement(org.eclipse.jdt.core.dom.MethodDeclaration methodDecl)
|
static org.eclipse.jdt.core.dom.ReturnStatement |
getLastStatementReturn(org.eclipse.jdt.core.dom.MethodDeclaration methodDecl)
|
String |
getName()
|
static org.eclipse.jdt.core.dom.CompilationUnit |
parseCode(String qualifiedCompUnitName,
String code)
|
void |
runAnalysis(IAnalysisReporter reporter,
IAnalysisInput input,
org.eclipse.jdt.core.ICompilationUnit compUnit,
org.eclipse.jdt.core.dom.CompilationUnit rootNode)
Run the analysis! |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EclipseTACSimpleTestDriver()
Method Detail |
---|
public void runAnalysis(IAnalysisReporter reporter, IAnalysisInput input, org.eclipse.jdt.core.ICompilationUnit compUnit, org.eclipse.jdt.core.dom.CompilationUnit rootNode)
ICrystalAnalysis
runAnalysis
in interface ICrystalAnalysis
reporter
- The object that is used to report errors. Output.input
- The input to this analysis.compUnit
- The compilation unitrootNode
- The root ASTNode of the compilation unitpublic static void assertOperands(List<org.eclipse.jdt.core.dom.Expression> exprs, List<Variable> operands, EclipseTAC tac)
public static void assertMethodParameter(Variable x, org.eclipse.jdt.core.dom.MethodDeclaration m, int parameterIndex, EclipseTAC tac)
public static org.eclipse.jdt.core.dom.MethodDeclaration getFirstMethod(org.eclipse.jdt.core.dom.CompilationUnit compUnit)
public static org.eclipse.jdt.core.dom.VariableDeclarationFragment getFirstField(org.eclipse.jdt.core.dom.CompilationUnit compUnit)
public static org.eclipse.jdt.core.dom.ReturnStatement getLastStatementReturn(org.eclipse.jdt.core.dom.MethodDeclaration methodDecl)
public static org.eclipse.jdt.core.dom.Statement getLastStatement(org.eclipse.jdt.core.dom.MethodDeclaration methodDecl)
public static org.eclipse.jdt.core.dom.CompilationUnit parseCode(String qualifiedCompUnitName, String code) throws CoreException
CoreException
public String getName()
getName
in interface ICrystalAnalysis
public void afterAllCompilationUnits()
ICrystalAnalysis
afterAllCompilationUnits
in interface ICrystalAnalysis
public void beforeAllCompilationUnits()
ICrystalAnalysis
beforeAllCompilationUnits
in interface ICrystalAnalysis
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |