diff options
author | Allen Hair <allenhair@google.com> | 2022-03-22 17:03:20 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-03-22 17:03:20 +0000 |
commit | 46c6f6b35356755e3d46201683c08e25017fd600 (patch) | |
tree | e68ce50b1fc964c12a1eb020ca8b2483ff2955d4 /org.jacoco.core.test/src/org/jacoco/core/internal/instr | |
parent | 03781fd320e32cd09b8fab66e842404535072103 (diff) | |
parent | 57f9fdd3381050da63e88482a103acea86b74dd7 (diff) | |
download | jacoco-46c6f6b35356755e3d46201683c08e25017fd600.tar.gz |
Merge "Update jacoco to 0.8.7."
Diffstat (limited to 'org.jacoco.core.test/src/org/jacoco/core/internal/instr')
10 files changed, 163 insertions, 119 deletions
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ClassInstrumenterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ClassInstrumenterTest.java index c5ef8201..7ae215df 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ClassInstrumenterTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ClassInstrumenterTest.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.internal.instr; @@ -27,9 +28,9 @@ public class ClassInstrumenterTest implements IProbeArrayStrategy { @Before public void setup() { - instrumenter = new ClassInstrumenter(this, new ClassVisitor( - InstrSupport.ASM_API_VERSION) { - }); + instrumenter = new ClassInstrumenter(this, + new ClassVisitor(InstrSupport.ASM_API_VERSION) { + }); } @Test(expected = IllegalStateException.class) @@ -48,14 +49,15 @@ public class ClassInstrumenterTest implements IProbeArrayStrategy { @Test public void testNoMethodVisitor() { - instrumenter = new ClassInstrumenter(this, new ClassVisitor( - InstrSupport.ASM_API_VERSION) { - @Override - public MethodVisitor visitMethod(int access, String name, - String desc, String signature, String[] exceptions) { - return null; - } - }); + instrumenter = new ClassInstrumenter(this, + new ClassVisitor(InstrSupport.ASM_API_VERSION) { + @Override + public MethodVisitor visitMethod(int access, String name, + String desc, String signature, + String[] exceptions) { + return null; + } + }); assertNull(instrumenter.visitMethod(0, "foo", "()V", null, null)); } diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategyTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategyTest.java index 6397a59b..af97addb 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategyTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategyTest.java @@ -1,9 +1,10 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Evgeny Mandrikov - initial API and implementation diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/DuplicateFrameEliminatorTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/DuplicateFrameEliminatorTest.java index 4098189f..8183e8f7 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/DuplicateFrameEliminatorTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/DuplicateFrameEliminatorTest.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.internal.instr; @@ -82,14 +83,14 @@ public class DuplicateFrameEliminatorTest { @Test public void testTypeInsn() { - testInstructionBetweenFrames(new TypeInsnNode(Opcodes.NEW, - "java/lang/Object")); + testInstructionBetweenFrames( + new TypeInsnNode(Opcodes.NEW, "java/lang/Object")); } @Test public void testFieldInsn() { - testInstructionBetweenFrames(new FieldInsnNode(Opcodes.GETFIELD, "Foo", - "f", "I")); + testInstructionBetweenFrames( + new FieldInsnNode(Opcodes.GETFIELD, "Foo", "f", "I")); } @Test @@ -106,8 +107,8 @@ public class DuplicateFrameEliminatorTest { @Test public void testJumpInsn() { - testInstructionBetweenFrames(new JumpInsnNode(Opcodes.GOTO, - new LabelNode())); + testInstructionBetweenFrames( + new JumpInsnNode(Opcodes.GOTO, new LabelNode())); } @Test @@ -134,8 +135,8 @@ public class DuplicateFrameEliminatorTest { @Test public void testMultiANewArrayInsn() { - testInstructionBetweenFrames(new MultiANewArrayInsnNode( - "java/lang/String", 4)); + testInstructionBetweenFrames( + new MultiANewArrayInsnNode("java/lang/String", 4)); } private void testInstructionBetweenFrames(AbstractInsnNode node) { 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 8345ac1b..6a47d55f 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 @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.internal.instr; @@ -15,11 +16,10 @@ import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.ClassWriter; @@ -36,9 +36,6 @@ public class InstrSupportTest { private Printer printer; private TraceMethodVisitor trace; - @Rule - public ExpectedException exception = ExpectedException.none(); - @Before public void setup() { printer = new Textifier(); @@ -46,8 +43,8 @@ public class InstrSupportTest { } @Test - public void classReaderFor_should_read_java_13_class() { - final byte[] bytes = createJava13Class(); + public void classReaderFor_should_read_java_16_class() { + final byte[] bytes = createJava16Class(); final ClassReader classReader = InstrSupport.classReaderFor(bytes); @@ -56,16 +53,16 @@ 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.V12 + 1, version); + assertEquals(Opcodes.V16, version); } }, 0); - assertArrayEquals(createJava13Class(), bytes); + assertArrayEquals(createJava16Class(), bytes); } - private static byte[] createJava13Class() { + private static byte[] createJava16Class() { final ClassWriter cw = new ClassWriter(0); - cw.visit(Opcodes.V12 + 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 +124,10 @@ public class InstrSupportTest { assertTrue(InstrSupport.needsFrames(Opcodes.V10)); assertTrue(InstrSupport.needsFrames(Opcodes.V11)); assertTrue(InstrSupport.needsFrames(Opcodes.V12)); - assertTrue(InstrSupport.needsFrames(Opcodes.V12 + 1)); + assertTrue(InstrSupport.needsFrames(Opcodes.V13)); + assertTrue(InstrSupport.needsFrames(Opcodes.V14)); + assertTrue(InstrSupport.needsFrames(Opcodes.V15)); + assertTrue(InstrSupport.needsFrames(Opcodes.V16)); assertTrue(InstrSupport.needsFrames(0x0100)); } @@ -139,20 +139,26 @@ public class InstrSupportTest { @Test public void assertNotIntrumented_should_throw_exception_when_jacoco_data_field_is_present() { - exception.expect(IllegalStateException.class); - exception.expectMessage( - "Cannot process instrumented class Foo. Please supply original non-instrumented classes."); - - InstrSupport.assertNotInstrumented("$jacocoData", "Foo"); + try { + InstrSupport.assertNotInstrumented("$jacocoData", "Foo"); + fail("exception expected"); + } catch (IllegalStateException e) { + assertEquals( + "Cannot process instrumented class Foo. Please supply original non-instrumented classes.", + e.getMessage()); + } } @Test public void assertNotIntrumented_should_throw_exception_when_jacoco_init_method_is_present() { - exception.expect(IllegalStateException.class); - exception.expectMessage( - "Cannot process instrumented class Foo. Please supply original non-instrumented classes."); - - InstrSupport.assertNotInstrumented("$jacocoInit", "Foo"); + try { + InstrSupport.assertNotInstrumented("$jacocoInit", "Foo"); + fail("exception expected"); + } catch (IllegalStateException e) { + assertEquals( + "Cannot process instrumented class Foo. Please supply original non-instrumented classes.", + e.getMessage()); + } } @Test diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/MethodInstrumenterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/MethodInstrumenterTest.java index 0d253fcf..0c5658ba 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/MethodInstrumenterTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/MethodInstrumenterTest.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.internal.instr; @@ -195,8 +196,8 @@ public class MethodInstrumenterTest { final Label L2 = new Label(); LabelInfo.setProbeId(L0, 0); LabelInfo.setProbeId(L1, 1); - instrumenter.visitTableSwitchInsnWithProbes(3, 5, L0, new Label[] { L1, - L1, L2 }, frame); + instrumenter.visitTableSwitchInsnWithProbes(3, 5, L0, + new Label[] { L1, L1, L2 }, frame); expectedVisitor.visitTableSwitchInsn(3, 4, L0, new Label[] { L1, L1, L2 }); diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategyTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategyTest.java index 0c21f02c..682dd972 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategyTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategyTest.java @@ -1,9 +1,10 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Evgeny Mandrikov - initial API and implementation diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java index f1d1282a..dab3bf01 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.internal.instr; diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeCounterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeCounterTest.java index 86956256..6ed002a2 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeCounterTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeCounterTest.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.internal.instr; diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java index c086f514..fa42be82 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.internal.instr; @@ -18,8 +19,10 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.Label; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; +import org.objectweb.asm.TypeReference; /** * Unit tests for {@link ProbeInserter}. @@ -39,7 +42,8 @@ public class ProbeInserterTest { expected = new MethodRecorder(); expectedVisitor = expected.getVisitor(); arrayStrategy = new IProbeArrayStrategy() { - public int storeInstance(MethodVisitor mv, boolean clinit, int variable) { + public int storeInstance(MethodVisitor mv, boolean clinit, + int variable) { mv.visitLdcInsn(clinit ? "clinit" : "init"); return 5; } @@ -183,6 +187,28 @@ public class ProbeInserterTest { } @Test + public void should_remap_LocalVariableAnnotation() { + ProbeInserter pi = new ProbeInserter(0, "m", "(I)V", actualVisitor, + arrayStrategy); + + final Label start = new Label(); + pi.visitLabel(start); + final Label end = new Label(); + pi.visitLabel(end); + + pi.visitLocalVariableAnnotation(TypeReference.LOCAL_VARIABLE, null, + new Label[] { start }, new Label[] { end }, new int[] { 2 }, + "LNonNull;", false); + + expectedVisitor.visitLabel(start); + expectedVisitor.visitLabel(end); + // Local variables are shifted by one: + expectedVisitor.visitLocalVariableAnnotation( + TypeReference.LOCAL_VARIABLE, null, new Label[] { start }, + new Label[] { end }, new int[] { 3 }, "LNonNull;", false); + } + + @Test public void testVisitMaxs1() { ProbeInserter pi = new ProbeInserter(0, "m", "(II)V", actualVisitor, arrayStrategy); @@ -209,11 +235,13 @@ public class ProbeInserterTest { ProbeInserter pi = new ProbeInserter(0, "m", "(J)V", actualVisitor, arrayStrategy); - pi.visitFrame(Opcodes.F_NEW, 3, new Object[] { "Foo", Opcodes.LONG, - "java/lang/String" }, 0, new Object[0]); + pi.visitFrame(Opcodes.F_NEW, 3, + new Object[] { "Foo", Opcodes.LONG, "java/lang/String" }, 0, + new Object[0]); - expectedVisitor.visitFrame(Opcodes.F_NEW, 4, new Object[] { "Foo", - Opcodes.LONG, "[Z", "java/lang/String" }, 0, new Object[0]); + expectedVisitor.visitFrame(Opcodes.F_NEW, 4, + new Object[] { "Foo", Opcodes.LONG, "[Z", "java/lang/String" }, + 0, new Object[0]); } @Test @@ -235,8 +263,8 @@ public class ProbeInserterTest { pi.visitFrame(Opcodes.F_NEW, 2, new Object[] { Opcodes.DOUBLE, "Foo" }, 0, new Object[0]); - expectedVisitor.visitFrame(Opcodes.F_NEW, 3, new Object[] { "[Z", - Opcodes.DOUBLE, "Foo" }, 0, new Object[0]); + expectedVisitor.visitFrame(Opcodes.F_NEW, 3, + new Object[] { "[Z", Opcodes.DOUBLE, "Foo" }, 0, new Object[0]); } @Test @@ -247,8 +275,8 @@ public class ProbeInserterTest { pi.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[] {}); // The locals in this frame are filled with TOP up to the probe variable - expectedVisitor.visitFrame(Opcodes.F_NEW, 2, new Object[] { - Opcodes.TOP, "[Z", }, 0, new Object[] {}); + expectedVisitor.visitFrame(Opcodes.F_NEW, 2, + new Object[] { Opcodes.TOP, "[Z", }, 0, new Object[] {}); } @Test @@ -259,8 +287,9 @@ public class ProbeInserterTest { pi.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[] {}); // The locals in this frame are filled with TOP up to the probe variable - expectedVisitor.visitFrame(Opcodes.F_NEW, 3, new Object[] { - Opcodes.TOP, Opcodes.TOP, "[Z", }, 0, new Object[] {}); + expectedVisitor.visitFrame(Opcodes.F_NEW, 3, + new Object[] { Opcodes.TOP, Opcodes.TOP, "[Z", }, 0, + new Object[] {}); } @Test @@ -272,9 +301,11 @@ public class ProbeInserterTest { new Object[] {}); // The locals in this frame are filled with TOP up to the probe variable - expectedVisitor.visitFrame(Opcodes.F_NEW, 5, new Object[] { - Opcodes.DOUBLE, Opcodes.TOP, Opcodes.TOP, Opcodes.TOP, "[Z", }, - 0, new Object[] {}); + expectedVisitor + .visitFrame( + Opcodes.F_NEW, 5, new Object[] { Opcodes.DOUBLE, + Opcodes.TOP, Opcodes.TOP, Opcodes.TOP, "[Z", }, + 0, new Object[] {}); } @Test(expected = IllegalArgumentException.class) diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SignatureRemoverTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SignatureRemoverTest.java index 1500b7cd..2c6078b9 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SignatureRemoverTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SignatureRemoverTest.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0 + * + * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Marc R. Hoffmann - initial API and implementation - * + * *******************************************************************************/ package org.jacoco.core.internal.instr; @@ -111,14 +112,12 @@ public class SignatureRemoverTest { + "Name: org/jacoco/example/B.class\r\n" // + "OtherInfo: keep this\r\n" // + "\r\n"; - assertEquals( - createManifest(expected.getBytes("ISO-8859-1")), + assertEquals(createManifest(expected.getBytes("ISO-8859-1")), createManifest(out.toByteArray())); } private static Manifest createManifest(final byte[] bytes) throws IOException { - return new Manifest( - new ByteArrayInputStream(bytes)); + return new Manifest(new ByteArrayInputStream(bytes)); } } |