Commit 7440fa7c authored by Eric Bruneton's avatar Eric Bruneton

Fix ASM7 value, following code review.

parent 485be1c9
Pipeline #2794 passed with stage
in 6 minutes and 56 seconds
...@@ -235,7 +235,7 @@ public abstract class AsmTest { ...@@ -235,7 +235,7 @@ public abstract class AsmTest {
ASM4("ASM4", 4 << 16), ASM4("ASM4", 4 << 16),
ASM5("ASM5", 5 << 16), ASM5("ASM5", 5 << 16),
ASM6("ASM6", 6 << 16), ASM6("ASM6", 6 << 16),
ASM7("ASM7", 1 << 24 | 7 << 16); ASM7("ASM7", 7 << 16);
private final String name; private final String name;
private final int value; private final int value;
......
...@@ -73,7 +73,7 @@ public class AsmTestTest extends AsmTest { ...@@ -73,7 +73,7 @@ public class AsmTestTest extends AsmTest {
@MethodSource(ALL_CLASSES_AND_LATEST_API) @MethodSource(ALL_CLASSES_AND_LATEST_API)
public void testGetBytes(final PrecompiledClass classParameter, final Api apiParameter) { public void testGetBytes(final PrecompiledClass classParameter, final Api apiParameter) {
assertEquals(Api.ASM7, apiParameter); assertEquals(Api.ASM7, apiParameter);
assertEquals(0x01070000, apiParameter.value()); assertEquals(0x70000, apiParameter.value());
assertEquals("ASM7", apiParameter.toString()); assertEquals("ASM7", apiParameter.toString());
byte[] classContent = classParameter.getBytes(); byte[] classContent = classParameter.getBytes();
assertThatClass(classContent).contains(classParameter.getInternalName()); assertThatClass(classContent).contains(classParameter.getInternalName());
......
...@@ -45,7 +45,7 @@ public interface Opcodes { ...@@ -45,7 +45,7 @@ public interface Opcodes {
int ASM4 = 4 << 16 | 0 << 8; int ASM4 = 4 << 16 | 0 << 8;
int ASM5 = 5 << 16 | 0 << 8; int ASM5 = 5 << 16 | 0 << 8;
int ASM6 = 6 << 16 | 0 << 8; int ASM6 = 6 << 16 | 0 << 8;
int ASM7 = 1 << 24 | 7 << 16 | 0 << 8; int ASM7 = 7 << 16 | 0 << 8;
// Java ClassFile versions (the minor version is stored in the 16 most // Java ClassFile versions (the minor version is stored in the 16 most
// significant bits, and the // significant bits, and the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment