use of org.robovm.compiler.util.generic.Type in project robovm by robovm.
the class ObjCBlockPluginTest method testResolveTargetMethodSignature.
private void testResolveTargetMethodSignature(String runnerMethodName, Type expectedReturnType, Type... expectedParamTypes) {
SootMethod m = toSootClass(Runners.class).getMethodByName(runnerMethodName);
SootMethodType mType = new SootMethodType(m);
SootMethod target = ObjCBlockPlugin.getBlockTargetMethod(m, 0);
Type[] types = ObjCBlockPlugin.resolveTargetMethodSignature(m, target, mType.getGenericParameterTypes()[0]);
assertEquals(target.getParameterCount() + 1, types.length);
assertEquals(expectedReturnType, types[0]);
for (int i = 0; i < types.length - 1; i++) {
assertEquals(expectedParamTypes[i], types[i + 1]);
}
}
Aggregations