import org.allspice.bytecode.instructions.Load;
import org.allspice.bytecode.instructions.Return;
public class TestDiv extends MyTestCase {
public ClassDef defadd(String ret,String type,int i1,int i2) {
ClassDef cd = makeClassDef() ;
Var x = new Var(i1,new TypeName(type)) ;
Var y = new Var(i2,new TypeName(type)) ;
MethodDef md = new MethodDef(new TypeName(ret),"meth",x,y) ;
md = md.addInstructions(
new Load(x),
new Load(y),
new Divide(TypeCode.getType(type)),
new Return(TypeCode.getType(ret))
) ;
return cd.addMethod(md) ;
}