Examples of visitClassExecution()


Examples of org.jacoco.core.data.ExecutionDataWriter.visitClassExecution()

  private byte[] createSessionData() throws Exception {
    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    ExecutionDataWriter writer = new ExecutionDataWriter(buffer);
    SessionInfo info = new SessionInfo("id1", 1, 2);
    writer.visitSessionInfo(info);
    writer.visitClassExecution(new ExecutionData(123, "MyClass", new boolean[] {
        true, false }));
    return buffer.toByteArray();
  }
}
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter.visitClassExecution()

    // Create execution data file:
    File execfile = new File(folder.getRoot(), "test.exec");
    OutputStream out = new FileOutputStream(execfile);
    ExecutionDataWriter writer = new ExecutionDataWriter(out);
    writer.visitSessionInfo(new SessionInfo("id", 1, 2));
    writer.visitClassExecution(new ExecutionData(123, "MyClass", 15));
    out.close();

    final CoverageSession session = new CoverageSession("Description",
        Arrays.asList(root1), Path.fromOSString(execfile.getAbsolutePath()),
        configuration);
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter.visitClassExecution()

  public void testReadExecutionDataCanceled() throws IOException, CoreException {
    // Create execution data file:
    File execfile = new File(folder.getRoot(), "test.exec");
    OutputStream out = new FileOutputStream(execfile);
    ExecutionDataWriter writer = new ExecutionDataWriter(out);
    writer.visitClassExecution(new ExecutionData(123, "MyClass", 15));
    out.close();

    final CoverageSession session = new CoverageSession("Description",
        Arrays.asList(root1), Path.fromOSString(execfile.getAbsolutePath()),
        configuration);
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter.visitClassExecution()

  private IExecutionDataSource createValidSource() throws IOException {
    File execfile = new File(folder.getRoot(), "test.exec");
    OutputStream out = new FileOutputStream(execfile);
    ExecutionDataWriter writer = new ExecutionDataWriter(out);
    writer.visitSessionInfo(new SessionInfo("id", 1, 2));
    writer.visitClassExecution(new ExecutionData(123, "MyClass", 15));
    out.close();
    return new URLExecutionDataSource(execfile.toURL());
  }

  private IExecutionDataSource creatInvalidSource() throws IOException {
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter.visitClassExecution()

  private File createFile(String id) throws IOException {
    final File file = new File(sourceFolder.getRoot(), id + ".exec");
    final FileOutputStream out = new FileOutputStream(file);
    final ExecutionDataWriter writer = new ExecutionDataWriter(out);
    final int value = id.length();
    writer.visitClassExecution(new ExecutionData(value, id, new boolean[0]));
    writer.visitSessionInfo(new SessionInfo(id, value, value));
    out.close();
    return file;
  }
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter.visitClassExecution()

  private String createExecFile() throws IOException {
    File f = File.createTempFile("jacoco", ".exec");
    final FileOutputStream out = new FileOutputStream(f);
    final ExecutionDataWriter writer = new ExecutionDataWriter(out);
    writer.visitSessionInfo(new SessionInfo("testid", 1, 2));
    writer.visitClassExecution(new ExecutionData(0x1234, "foo/MyClass",
        new boolean[] { false, true, true }));
    writer.flush();
    out.close();
    return f.getPath();
  }
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter.visitClassExecution()

  private byte[] createSessionData() throws Exception {
    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    ExecutionDataWriter writer = new ExecutionDataWriter(buffer);
    SessionInfo info = new SessionInfo("id1", 1, 2);
    writer.visitSessionInfo(info);
    writer.visitClassExecution(new ExecutionData(123, "MyClass", new boolean[] {
        true, false }));
    return buffer.toByteArray();
  }
}
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter.visitClassExecution()

  private IExecutionDataSource createValidSource() throws IOException {
    File execfile = new File(folder.getRoot(), "test.exec");
    OutputStream out = new FileOutputStream(execfile);
    ExecutionDataWriter writer = new ExecutionDataWriter(out);
    writer.visitSessionInfo(new SessionInfo("id", 1, 2));
    writer.visitClassExecution(new ExecutionData(123, "MyClass", 15));
    out.close();
    return new URLExecutionDataSource(execfile.toURL());
  }

  private IExecutionDataSource creatInvalidSource() throws IOException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.