Package org.jacoco.core.runtime

Examples of org.jacoco.core.runtime.SystemPropertiesRuntime


    source = Source.getSourceFor(target);
  }

  private ExecutionDataStore execute(final ClassReader reader)
      throws Exception {
    IRuntime runtime = new SystemPropertiesRuntime();
    runtime.startup();
    final byte[] bytes = new Instrumenter(runtime).instrument(reader);
    final TargetLoader loader = new TargetLoader(target, bytes);
    run(loader.getTargetClass());
    final ExecutionDataStore store = new ExecutionDataStore();
    runtime.collect(store, null, false);
    runtime.shutdown();
    return store;
  }
View Full Code Here


    source = Source.getSourceFor(target);
  }

  private ExecutionDataStore execute(final ClassReader reader)
      throws Exception {
    IRuntime runtime = new SystemPropertiesRuntime();
    runtime.startup();
    final byte[] bytes = new Instrumenter(runtime).instrument(reader);
    final TargetLoader loader = new TargetLoader(target, bytes);
    final Object instance = loader.getTargetClass().newInstance();
    ((Runnable) instance).run();
    final ExecutionDataStore store = new ExecutionDataStore();
    runtime.collect(store, false);
    runtime.shutdown();
    return store;
  }
View Full Code Here

  }

  private void testVersion(int version, boolean frames) {
    final byte[] original = createClass(version);

    IRuntime runtime = new SystemPropertiesRuntime();
    Instrumenter instrumenter = new Instrumenter(runtime);
    byte[] instrumented = instrumenter.instrument(original);

    assertFrames(instrumented, frames);
  }
View Full Code Here

  private ClassReader reader;
  private Target target;

  @Before
  public void setup() throws Exception {
    runtime = new SystemPropertiesRuntime();
    runtime.startup();
  }
View Full Code Here

      };
    }
  }

  private void testFrames(Class<?> target) throws IOException {
    IRuntime runtime = new SystemPropertiesRuntime();
    Instrumenter instrumenter = new Instrumenter(runtime);
    byte[] source = TargetLoader.getClassDataAsBytes(target);
    source = calculateFrames(source);
    byte[] actual = instrumenter.instrument(source);
    byte[] expected = calculateFrames(actual);
View Full Code Here

  private ClassReader reader;
  private Target target;

  @Before
  public void setup() throws Exception {
    runtime = new SystemPropertiesRuntime();
    runtime.startup();
  }
View Full Code Here

    source = Source.getSourceFor(target);
  }

  private ExecutionDataStore execute(final ClassReader reader)
      throws Exception {
    IRuntime runtime = new SystemPropertiesRuntime();
    runtime.startup();
    final byte[] bytes = new Instrumenter(runtime).instrument(reader);
    final TargetLoader loader = new TargetLoader(target, bytes);
    run(loader.getTargetClass());
    final ExecutionDataStore store = new ExecutionDataStore();
    runtime.collect(store, false);
    runtime.shutdown();
    return store;
  }
View Full Code Here

    source = Source.getSourceFor(target);
  }

  private ExecutionDataStore execute(final ClassReader reader)
      throws Exception {
    IRuntime runtime = new SystemPropertiesRuntime();
    runtime.startup();
    final byte[] bytes = new Instrumenter(runtime).instrument(reader);
    final TargetLoader loader = new TargetLoader(target, bytes);
    run(loader.getTargetClass());
    final ExecutionDataStore store = new ExecutionDataStore();
    runtime.collect(store, null, false);
    runtime.shutdown();
    return store;
  }
View Full Code Here

  }

  private void testVersion(int version, boolean frames) throws IOException {
    final byte[] original = createClass(version);

    IRuntime runtime = new SystemPropertiesRuntime();
    Instrumenter instrumenter = new Instrumenter(runtime);
    byte[] instrumented = instrumenter.instrument(original, "TestTarget");

    assertFrames(instrumented, frames);
  }
View Full Code Here

  private Target target;

  @Before
  public void setup() throws Exception {
    data = new RuntimeData();
    runtime = new SystemPropertiesRuntime();
    runtime.startup(data);
  }
View Full Code Here

TOP

Related Classes of org.jacoco.core.runtime.SystemPropertiesRuntime

Copyright © 2018 www.massapicom. 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.