forked from JavaTX/JavaCompilerCore
ExtendsVectorString erweitert
This commit is contained in:
parent
f18fcd2b12
commit
dc0cf0cd34
@ -3,6 +3,7 @@ package bytecode.types;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
@ -51,7 +52,23 @@ public class ExtendsVectorStringTest extends ASTBytecodeTest{
|
||||
|
||||
@Test
|
||||
public void testParameter(){
|
||||
throw new RuntimeException("Not implemented yet!");
|
||||
try{
|
||||
ClassLoader classLoader = getClassLoader();
|
||||
|
||||
Class cls = classLoader.loadClass(testName);
|
||||
|
||||
Object obj = cls.newInstance();
|
||||
|
||||
Class stringClass = classLoader.loadClass("java.lang.Object");
|
||||
|
||||
Class[] params = new Class[1];
|
||||
params[0] = stringClass;
|
||||
|
||||
Method method = cls.getDeclaredMethod("add", params);
|
||||
method.invoke(obj, stringClass.newInstance());
|
||||
}catch(Exception e){
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user