402403404405406407408409410411412
} } public void testIllegalMethodInsn() { MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor()); mv.visitCode(); try { mv.visitInsn(-1); fail(); } catch (Exception e) { }
412413414415416417418419420421422
} } public void testIllegalByteInsnOperand() { MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor()); mv.visitCode(); try { mv.visitIntInsn(BIPUSH, Integer.MAX_VALUE); fail(); } catch (Exception e) { }
422423424425426427428429430431432
} } public void testIllegalShortInsnOperand() { MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor()); mv.visitCode(); try { mv.visitIntInsn(SIPUSH, Integer.MAX_VALUE); fail(); } catch (Exception e) { }
432433434435436437438439440441442
} } public void testIllegalVarInsnOperand() { MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor()); mv.visitCode(); try { mv.visitVarInsn(ALOAD, -1); fail(); } catch (Exception e) { }
442443444445446447448449450451452
} } public void testIllegalIntInsnOperand() { MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor()); mv.visitCode(); try { mv.visitIntInsn(NEWARRAY, 0); fail(); } catch (Exception e) { }
452453454455456457458459460461462
} } public void testIllegalTypeInsnOperand() { MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor()); mv.visitCode(); try { mv.visitTypeInsn(NEW, "[I"); fail(); } catch (Exception e) { }
462463464465466467468469470471472
} } public void testIllegalLabelInsnOperand() { MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor()); mv.visitCode(); Label l = new Label(); mv.visitLabel(l); try { mv.visitLabel(l); fail();
526527528529530531532533534535536
} } public void testIllegalTableSwitchParameters1() { MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor()); mv.visitCode(); try { mv.visitTableSwitchInsn(1, 0, new Label(), new Label[0]); fail(); } catch (Exception e) { }
536537538539540541542543544545546
} } public void testIllegalTableSwitchParameters2() { MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor()); mv.visitCode(); try { mv.visitTableSwitchInsn(0, 1, null, new Label[0]); fail(); } catch (Exception e) { }
546547548549550551552553554555556
} } public void testIllegalTableSwitchParameters3() { MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor()); mv.visitCode(); try { mv.visitTableSwitchInsn(0, 1, new Label(), (Label[])null); fail(); } catch (Exception e) { }