use of org.abs_models.frontend.ast.AsyncCall in project abstools by abstools.
the class AbsASTBuilderUtil method getCall.
public static final Call getCall(PureExp who, String method, boolean sync, PureExp... exps) {
Call call;
if (sync) {
call = new SyncCall();
} else {
call = new AsyncCall();
}
call.setCallee(who);
call.setMethod(method);
for (int i = 0; i < exps.length; i++) {
call.setParam(exps[i], i);
}
return call;
}
use of org.abs_models.frontend.ast.AsyncCall in project abstools by abstools.
the class ASTBasedABSTestRunnerGenerator method generateAsyncTestCallAST.
private void generateAsyncTestCallAST(Block block, String objectRef, MethodSig method) {
List<PureExp> args = new List<>();
if (method.getNumParam() > 0) {
args.add(new VarUse(dataValue));
}
block.addStmtNoTransform(getVAssign(fut, new AsyncCall(new VarUse(objectRef), method.getName(), args)));
block.addStmtNoTransform(getVAssign(futs, getFnApp("Insert", new VarUse(fut), new VarUse(futs))));
}