public class TestLookupSwitch extends MyTestCase {
public ClassDef defadd() {
ClassDef cd = makeClassDef() ;
Var x = new Var(1,TypeName.INT) ;
MethodDef md = new MethodDef(TypeName.DOUBLE,"meth",x) ;
Mark one = new Mark() ;
Mark two = new Mark() ;
Mark three = new Mark() ;
Mark others = new Mark() ;
md = md.addInstructions(
new Load(x),
new LookupSwitch(new FIFO<CaseLabel>(new CaseLabel(3,three),new CaseLabel(1,one),new CaseLabel(2,two),new CaseLabel(null,others))),
new Nop(one),new Const(1.0),new Return(TypeCode.DOUBLE),
new Nop(two),new Const(2.0),new Return(TypeCode.DOUBLE),