}
}
public void testLineNumbers() throws Throwable {
AspectWerkzPreProcessor aw = new AspectWerkzPreProcessor();
aw.initialize();
String name = LineNumberTest.class.getName().replace('/', '.');
InputStream in = LineNumberTest.class.getClassLoader().getResourceAsStream(name.replace('.','/')+".class");
ByteArrayOutputStream bos = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
while (in.available() > 0) {
int length = in.read(buffer);
if (length == -1) {
break;
}
bos.write(buffer, 0, length);
}
in.close();
byte[] inBytes = bos.toByteArray();
AspectWerkzPreProcessor.Output output = aw.preProcessWithOutput(name, inBytes, LineNumberTest.class.getClassLoader());
// we have 11 joinpoints
assertEquals(11, output.emittedJoinPoints.length);
//Note: this test depends upon visitor order