JavaTXCompilerInJavaTX/test/mycompiler/test/trivial/TestMethodEmpty.java
2014-09-02 10:33:54 +02:00

39 lines
1.0 KiB
Java
Executable File

package mycompiler.test.trivial;
import de.dhbwstuttgart.syntaxtree.type.RefType;
import mycompiler.test.AbstractInferenceTest;
import mycompiler.test.expectationTypes.ClassExpect;
import mycompiler.test.expectationTypes.Expectation;
import mycompiler.test.expectationTypes.MethodExpect;
/**
* 01-04-08
* @author
*
* This test verifies identification of a simple method with return type void
*
*/
public class TestMethodEmpty extends AbstractInferenceTest {
private final static String TESTEDCLASSNAME="TestMethodEmpty";
private final static String JAVPATH="test/mycompiler/test/trivial/";
public TestMethodEmpty(String name) {
super(name,TestMethodEmpty.JAVPATH+TestMethodEmpty.TESTEDCLASSNAME + ".jav");
}
@Override
protected Expectation getExpectations() {
// Classes
ClassExpect testEmptyMethod = new ClassExpect(TestMethodEmpty.TESTEDCLASSNAME);
//Methods
MethodExpect emptyMethod = new MethodExpect("emptyMethod",new RefType("void",-1));
testEmptyMethod.addMethod(emptyMethod);
return new Expectation(testEmptyMethod);
}
}