aboutsummaryrefslogtreecommitdiff
path: root/org.jacoco.core.test/src/org/jacoco/core
diff options
context:
space:
mode:
authorMarc R. Hoffmann <hoffmann@mountainminds.com>2020-09-29 11:47:42 +0200
committerGitHub <noreply@github.com>2020-09-29 11:47:42 +0200
commit5f71f4d74e71fa363f4bb1678e16c03708b93ef8 (patch)
tree2def333bfa844cd21b12323060d6d15cdf514317 /org.jacoco.core.test/src/org/jacoco/core
parent4b37770e8506c217dc24ab9f1b2faabb7657801d (diff)
downloadjacoco-5f71f4d74e71fa363f4bb1678e16c03708b93ef8.tar.gz
Upgrade ASM to 9.0 (#1094)
Co-authored-by: Evgeny Mandrikov <mandrikov@gmail.com>
Diffstat (limited to 'org.jacoco.core.test/src/org/jacoco/core')
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java6
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java3
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java6
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java6
4 files changed, 11 insertions, 10 deletions
diff --git a/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java b/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java
index 120ddb92..33d1ea5a 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java
@@ -107,7 +107,7 @@ public class AnalyzerTest {
@Test
public void should_not_modify_class_bytes_to_support_next_version()
throws Exception {
- final byte[] originalBytes = createClass(Opcodes.V15 + 1);
+ final byte[] originalBytes = createClass(Opcodes.V16);
final byte[] bytes = new byte[originalBytes.length];
System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
final long expectedClassId = CRC64.classId(bytes);
@@ -130,7 +130,7 @@ public class AnalyzerTest {
*/
@Test
public void analyzeClass_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V15 + 2);
+ final byte[] bytes = createClass(Opcodes.V16 + 1);
try {
analyzer.analyzeClass(bytes, "UnsupportedVersion");
fail("exception expected");
@@ -217,7 +217,7 @@ public class AnalyzerTest {
*/
@Test
public void analyzeAll_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V15 + 2);
+ final byte[] bytes = createClass(Opcodes.V16 + 1);
try {
analyzer.analyzeAll(new ByteArrayInputStream(bytes),
"UnsupportedVersion");
diff --git a/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java b/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java
index f1d21db2..3afa8103 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java
@@ -30,6 +30,7 @@ import static org.objectweb.asm.Opcodes.V12;
import static org.objectweb.asm.Opcodes.V13;
import static org.objectweb.asm.Opcodes.V14;
import static org.objectweb.asm.Opcodes.V15;
+import static org.objectweb.asm.Opcodes.V16;
import static org.objectweb.asm.Opcodes.V1_1;
import static org.objectweb.asm.Opcodes.V1_2;
import static org.objectweb.asm.Opcodes.V1_3;
@@ -135,7 +136,7 @@ public class ClassFileVersionsTest {
@Test
public void test_16() throws IOException {
- testVersion(V15 + 1, true);
+ testVersion(V16, true);
}
private void testVersion(int version, boolean frames) throws IOException {
diff --git a/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java b/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java
index 5d29429a..b7500cb1 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java
@@ -99,7 +99,7 @@ public class InstrumenterTest {
@Test
public void should_not_modify_class_bytes_to_support_next_version()
throws Exception {
- final byte[] originalBytes = createClass(Opcodes.V15 + 1);
+ final byte[] originalBytes = createClass(Opcodes.V16);
final byte[] bytes = new byte[originalBytes.length];
System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
final long expectedClassId = CRC64.classId(bytes);
@@ -122,7 +122,7 @@ public class InstrumenterTest {
*/
@Test
public void instrument_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V15 + 2);
+ final byte[] bytes = createClass(Opcodes.V16 + 1);
try {
instrumenter.instrument(bytes, "UnsupportedVersion");
fail("exception expected");
@@ -224,7 +224,7 @@ public class InstrumenterTest {
*/
@Test
public void instrumentAll_should_throw_exception_for_unsupported_class_file_version() {
- final byte[] bytes = createClass(Opcodes.V15 + 2);
+ final byte[] bytes = createClass(Opcodes.V16 + 1);
try {
instrumenter.instrumentAll(new ByteArrayInputStream(bytes),
new ByteArrayOutputStream(), "UnsupportedVersion");
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java
index b6ddb293..a66b5ebd 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java
@@ -53,7 +53,7 @@ public class InstrSupportTest {
public void visit(final int version, final int access,
final String name, final String signature,
final String superName, final String[] interfaces) {
- assertEquals(Opcodes.V15 + 1, version);
+ assertEquals(Opcodes.V16, version);
}
}, 0);
@@ -62,7 +62,7 @@ public class InstrSupportTest {
private static byte[] createJava16Class() {
final ClassWriter cw = new ClassWriter(0);
- cw.visit(Opcodes.V15 + 1, 0, "Foo", null, "java/lang/Object", null);
+ cw.visit(Opcodes.V16, 0, "Foo", null, "java/lang/Object", null);
cw.visitEnd();
return cw.toByteArray();
}
@@ -127,7 +127,7 @@ public class InstrSupportTest {
assertTrue(InstrSupport.needsFrames(Opcodes.V13));
assertTrue(InstrSupport.needsFrames(Opcodes.V14));
assertTrue(InstrSupport.needsFrames(Opcodes.V15));
- assertTrue(InstrSupport.needsFrames(Opcodes.V15 + 1));
+ assertTrue(InstrSupport.needsFrames(Opcodes.V16));
assertTrue(InstrSupport.needsFrames(0x0100));
}