List of usage examples for org.objectweb.asm Opcodes V10
int V10
To view the source code for org.objectweb.asm Opcodes V10.
Click Source Link
From source file:org.jacoco.core.internal.data.CRC64Test.java
License:Open Source License
@Test public void except_java_9_checksums_should_be_different_for_different_bytecode_versions() { assertEquals(0x589E9080A572741EL, CRC64.classId(createClass(Opcodes.V10))); // should remove workaround for Java 9 // during change of exec file version assertEquals(0x1007, ExecutionDataWriter.FORMAT_VERSION); assertEquals(0xB5284860A572741CL, CRC64.classId(createClass(Opcodes.V9))); assertEquals(0xB5284860A572741CL, CRC64.classId(createClass(Opcodes.V1_8))); assertEquals(0x45284D30A572741AL, CRC64.classId(createClass(Opcodes.V1_7))); }
From source file:org.sonar.java.bytecode.loader.SquidClassLoaderTest.java
License:Open Source License
@Test public void test_loading_java10_class() throws Exception { SquidClassLoader classLoader = new SquidClassLoader( Collections.singletonList(new File("src/test/files/bytecode/java10/bin"))); byte[] bytes = classLoader.getBytesForClass("org.foo.A"); assertThat(bytes).isNotNull();// w w w . j av a 2s. co m ClassReader cr = new ClassReader(bytes); ClassNode classNode = new ClassNode(); cr.accept(classNode, 0); assertThat(classNode.version).isEqualTo(Opcodes.V10); classLoader.close(); }
From source file:se.eris.asm.AsmUtilsTest.java
License:Apache License
@Test void asmOpcodeToJavaVersion() { assertEquals(1, AsmUtils.asmOpcodeToJavaVersion(Opcodes.V1_1)); assertEquals(5, AsmUtils.asmOpcodeToJavaVersion(Opcodes.V1_5)); assertEquals(6, AsmUtils.asmOpcodeToJavaVersion(Opcodes.V1_6)); assertEquals(7, AsmUtils.asmOpcodeToJavaVersion(Opcodes.V1_7)); assertEquals(8, AsmUtils.asmOpcodeToJavaVersion(Opcodes.V1_8)); assertEquals(9, AsmUtils.asmOpcodeToJavaVersion(Opcodes.V9)); assertEquals(10, AsmUtils.asmOpcodeToJavaVersion(Opcodes.V10)); assertEquals(11, AsmUtils.asmOpcodeToJavaVersion(Opcodes.V11)); }