import junit.framework.Test;
+import org.aspectj.apache.bcel.classfile.JavaClass;
+import org.aspectj.apache.bcel.classfile.Method;
import org.aspectj.testing.XMLBasedAjcTestCase;
/**
// runTest("anno copying");
// }
+ public void testRangeForLocalVariables_353936() throws ClassNotFoundException {
+ runTest("local variable tables");
+ JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "X");
+ Method[] meths = jc.getMethods();
+ boolean checked = false;
+ for (int i = 0; i < meths.length; i++) {
+ Method method = meths[i];
+ if (method.getName().equals("ajc$before$X$2$3444dde4")) {
+ System.out.println(method.getName());
+ System.out.println(stringify(method.getLocalVariableTable()));
+ System.out.println(method.getCode().getLength());
+ checked = true;
+ assertEquals("LX; this(0) start=0 len=48", stringify(method.getLocalVariableTable(), 0));
+ assertEquals("Lorg/aspectj/lang/JoinPoint; thisJoinPoint(1) start=0 len=48",
+ stringify(method.getLocalVariableTable(), 1));
+ assertEquals("I i(2) start=8 len=22", stringify(method.getLocalVariableTable(), 2));
+ }
+ }
+ assertTrue(checked);
+ }
+
public void testEmptyPattern_pr352363() {
runTest("empty pattern");
}
<suite>
+<ajc-test dir="bugs1612/pr353936" title="local variable tables">
+<compile files="Code.java" options="-1.5"/>
+</ajc-test>
+
<ajc-test dir="bugs1612/pr352363" title="empty pattern">
<compile files="Code.java" options="-1.5">
<message line="12" kind="warning" text="name is empty1"/>