Example usage for org.objectweb.asm Opcodes V13

List of usage examples for org.objectweb.asm Opcodes V13

Introduction

In this page you can find the example usage for org.objectweb.asm Opcodes V13.

Prototype

int V13

To view the source code for org.objectweb.asm Opcodes V13.

Click Source Link

Usage

From source file:org.jacoco.core.analysis.AnalyzerTest.java

License:Open Source License

@Test
public void should_not_modify_class_bytes_to_support_next_version() throws Exception {
    final byte[] originalBytes = createClass(Opcodes.V13 + 1);
    final byte[] bytes = new byte[originalBytes.length];
    System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
    final long expectedClassId = CRC64.classId(bytes);

    analyzer.analyzeClass(bytes, "");

    assertArrayEquals(originalBytes, bytes);
    assertEquals(expectedClassId, classes.get("Foo").getId());
}

From source file:org.jacoco.core.instr.InstrumenterTest.java

License:Open Source License

@Test
public void should_not_modify_class_bytes_to_support_next_version() throws Exception {
    final byte[] originalBytes = createClass(Opcodes.V13 + 1);
    final byte[] bytes = new byte[originalBytes.length];
    System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
    final long expectedClassId = CRC64.classId(bytes);

    instrumenter.instrument(bytes, "");

    assertArrayEquals(originalBytes, bytes);
    assertEquals(expectedClassId, accessorGenerator.classId);
}