forked from JavaTX/JavaCompilerCore
ParameterInsertTest added
This commit is contained in:
parent
eef38bff42
commit
b29fa03782
@ -35,7 +35,19 @@ public class TypeInsertPoint {
|
||||
return this.getTypeInsertString().length();
|
||||
}
|
||||
|
||||
private String getTypeInsertString(){
|
||||
/**
|
||||
*
|
||||
* @return Der Offset des TypeInsertPoints in dem geparsten Source für dessen Klasse er erstellt wurde.
|
||||
*/
|
||||
public int getOffset(){
|
||||
return this.point.getOffset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Die Zeichenkette die durch diesen TypeInsertPoint eingesetzt wird. (Der Typ als String)
|
||||
* @return
|
||||
*/
|
||||
public String getTypeInsertString(){
|
||||
String ret = type.printJavaCode(this.resultSet).toString()+" ";
|
||||
return ret;
|
||||
}
|
||||
|
13
test/plugindevelopment/ParameterInsertTest.java
Normal file
13
test/plugindevelopment/ParameterInsertTest.java
Normal file
@ -0,0 +1,13 @@
|
||||
package plugindevelopment;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ParameterInsertTest {
|
||||
private static final String TEST_FILE = "ParameterTypeInsertTest.jav";
|
||||
private static final String SOLUTION_FILE = "ParameterTypeInsertTestSolution.jav";
|
||||
|
||||
@Test
|
||||
public void run(){
|
||||
TypeInsertTester.test(this.TEST_FILE, this.SOLUTION_FILE);
|
||||
}
|
||||
}
|
7
test/plugindevelopment/ParameterTypeInsertTest.jav
Normal file
7
test/plugindevelopment/ParameterTypeInsertTest.jav
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
class VariableTypeInsertTest{
|
||||
String var;
|
||||
void methode(test){
|
||||
var = test;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
|
||||
class VariableTypeInsertTest{
|
||||
String var;
|
||||
void methode(String test){
|
||||
var = test;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user