Examples of ExecutionDataWriter


Examples of org.jacoco.core.data.ExecutionDataWriter

   */
  @Test
  public void testLocalClose() throws Exception {
    final OutputStream remoteOut = mockConnection.getSocketB()
        .getOutputStream();
    new ExecutionDataWriter(remoteOut);

    final TcpConnection con = new TcpConnection(
        mockConnection.getSocketA(), runtime);
    con.init();

View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

    try {
      FileUtils.getFileUtils().createNewFile(destfile, true);

      outputStream = new BufferedOutputStream(new FileOutputStream(
          destfile));
      final ExecutionDataWriter dataWriter = new ExecutionDataWriter(
          outputStream);
      infoStore.accept(dataWriter);
      dataStore.accept(dataWriter);
    } catch (final IOException e) {
      throw new BuildException(String.format(
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

  }

  @Test
  public void testShutdownWithConnection() throws Exception {
    serverSocket.waitForAccept();
    new ExecutionDataWriter(serverSocket.connect().getOutputStream());
    controller.shutdown();
    logger.assertEmpty();
  }
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

      final RemoteControlReader remoteReader = new RemoteControlReader(
          socket.getInputStream());

      // 2. Open file output
      output = openOutputStream();
      final ExecutionDataWriter outputWriter = new ExecutionDataWriter(
          output);
      remoteReader.setSessionInfoVisitor(outputWriter);
      remoteReader.setExecutionDataVisitor(outputWriter);

      // 3. Request dump
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

    try {
      FileUtils.getFileUtils().createNewFile(destfile, true);

      outputStream = new BufferedOutputStream(new FileOutputStream(
          destfile));
      final ExecutionDataWriter dataWriter = new ExecutionDataWriter(
          outputStream);
      infoStore.accept(dataWriter);
      dataStore.accept(dataWriter);
    } catch (final IOException e) {
      throw new BuildException(format("Unable to write merged file %s",
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

    final Set<ILaunchConfiguration> launches = new HashSet<ILaunchConfiguration>();
    final IPath execfile = executiondatafiles.newFile();
    try {
      final OutputStream out = new BufferedOutputStream(new FileOutputStream(
          execfile.toFile()));
      final ExecutionDataWriter writer = new ExecutionDataWriter(out);

      // Merge all sessions
      for (ICoverageSession session : sessions) {
        scope.addAll(session.getScope());
        if (session.getLaunchConfiguration() != null) {
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

    assertEquals("MyClass", execStore.get(123).getName());
  }

  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

      throws CoreException {
    try {
      final File file = File.createTempFile("session", ".exec", folder); //$NON-NLS-1$ //$NON-NLS-2$
      final OutputStream out = new BufferedOutputStream(new FileOutputStream(
          file));
      final ExecutionDataWriter writer = new ExecutionDataWriter(out);
      source.accept(writer, writer);
      out.close();
      return new URLExecutionDataSource(file.toURL());
    } catch (IOException e) {
      throw new CoreException(EclEmmaStatus.EXEC_FILE_CREATE_ERROR.getStatus(e));
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

    final Set<ILaunchConfiguration> launches = new HashSet<ILaunchConfiguration>();
    final IPath execfile = executiondatafiles.newFile();
    try {
      final OutputStream out = new BufferedOutputStream(new FileOutputStream(
          execfile.toFile()));
      final ExecutionDataWriter writer = new ExecutionDataWriter(out);

      // Merge all sessions
      for (ICoverageSession session : sessions) {
        scope.addAll(session.getScope());
        if (session.getLaunchConfiguration() != null) {
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

    monitor.beginTask(
        NLS.bind(CoreMessages.ExportingSession_task, session.getDescription()),
        1);
    final OutputStream out = new BufferedOutputStream(new FileOutputStream(
        destination));
    final ExecutionDataWriter writer = new ExecutionDataWriter(out);
    session.accept(writer, writer);
    out.close();
    monitor.done();
  }
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.