diff options
Diffstat (limited to 'org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.java')
-rw-r--r-- | org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.java | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.java b/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.java index f3379943..2cc2c97d 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.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.data; @@ -151,8 +152,8 @@ public class ExecutionDataReaderWriterTest { @Test(expected = IOException.class) public void testMissingHeader() throws IOException { buffer.reset(); - writer.visitClassExecution(new ExecutionData(Long.MIN_VALUE, "Sample", - createData(8))); + writer.visitClassExecution( + new ExecutionData(Long.MIN_VALUE, "Sample", createData(8))); createReaderWithVisitors().read(); } @@ -164,8 +165,8 @@ public class ExecutionDataReaderWriterTest { @Test(expected = EOFException.class) public void testTruncatedFile() throws IOException { - writer.visitClassExecution(new ExecutionData(Long.MIN_VALUE, "Sample", - createData(8))); + writer.visitClassExecution( + new ExecutionData(Long.MIN_VALUE, "Sample", createData(8))); final byte[] content = buffer.toByteArray(); buffer.reset(); buffer.write(content, 0, content.length - 1); @@ -216,16 +217,16 @@ public class ExecutionDataReaderWriterTest { @Test(expected = IOException.class) public void testNoExecutionDataVisitor() throws IOException { - writer.visitClassExecution(new ExecutionData(Long.MIN_VALUE, "Sample", - createData(8))); + writer.visitClassExecution( + new ExecutionData(Long.MIN_VALUE, "Sample", createData(8))); createReader().read(); } @Test public void testMinClassId() throws IOException { final boolean[] data = createData(8); - writer.visitClassExecution(new ExecutionData(Long.MIN_VALUE, "Sample", - data)); + writer.visitClassExecution( + new ExecutionData(Long.MIN_VALUE, "Sample", data)); assertFalse(createReaderWithVisitors().read()); assertArrayEquals(data, store.get(Long.MIN_VALUE).getProbes()); } @@ -233,8 +234,8 @@ public class ExecutionDataReaderWriterTest { @Test public void testMaxClassId() throws IOException { final boolean[] data = createData(8); - writer.visitClassExecution(new ExecutionData(Long.MAX_VALUE, "Sample", - data)); + writer.visitClassExecution( + new ExecutionData(Long.MAX_VALUE, "Sample", data)); assertFalse(createReaderWithVisitors().read()); assertArrayEquals(data, store.get(Long.MAX_VALUE).getProbes()); } @@ -294,7 +295,8 @@ public class ExecutionDataReaderWriterTest { } }); broken[0] = true; - writer.visitClassExecution(new ExecutionData(3, "Sample", createData(1))); + writer.visitClassExecution( + new ExecutionData(3, "Sample", createData(1))); } private ExecutionDataReader createReaderWithVisitors() throws IOException { @@ -327,8 +329,8 @@ public class ExecutionDataReaderWriterTest { } protected ExecutionDataReader createReader() throws IOException { - return new ExecutionDataReader(new ByteArrayInputStream( - buffer.toByteArray())); + return new ExecutionDataReader( + new ByteArrayInputStream(buffer.toByteArray())); } } |