Examples of IRuntime


Examples of org.jacoco.core.runtime.IRuntime

      };
    }
  }

  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

Examples of org.jacoco.core.runtime.IRuntime

    int c;
    while ((c = in.read()) != -1) {
      out.write(c);
    }
    final byte[] buffer = out.toByteArray();
    final IRuntime runtime = new LoggerRuntime();
    return new Runnable() {

      public void run() {
        for (int i = 0; i < count; i++) {
          ClassReader reader = new ClassReader(buffer);
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

  public InstrumentationSizeSzenario(Class<?> target) {
    this.target = target;
  }

  public void run(IPerfOutput output) throws Exception {
    final IRuntime runtime = new LoggerRuntime();
    ClassReader reader = new ClassReader(TargetLoader.getClassData(target));
    final Instrumenter instr = new Instrumenter(runtime);
    instr.instrument(reader);
    output.writeByteResult("instrumented class",
        instr.instrument(reader).length, reader.b.length);
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

  public void testWriteData() throws Exception {
    File destFile = folder.newFile("jacoco.exec");
    AgentOptions options = new AgentOptions();
    options.setDestfile(destFile.getAbsolutePath());

    IRuntime runtime = new StubRuntime();

    LocalController controller = new LocalController();
    controller.startup(options, runtime);
    controller.writeExecutionData();
    controller.shutdown();
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

  @Test(expected = IOException.class)
  public void testInvalidDestFile() throws Exception {
    AgentOptions options = new AgentOptions();
    options.setDestfile(folder.newFolder("folder").getAbsolutePath());
    IRuntime runtime = new StubRuntime();
    LocalController controller = new LocalController();

    // Startup should fail as the file can not be created:
    controller.startup(options, runtime);
  }
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

    int c;
    while ((c = in.read()) != -1) {
      out.write(c);
    }
    final byte[] buffer = out.toByteArray();
    final IRuntime runtime = new LoggerRuntime();
    return new Runnable() {

      public void run() {
        for (int i = 0; i < count; i++) {
          ClassReader reader = new ClassReader(buffer);
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

  public InstrumentationSizeSzenario(Class<?> target) {
    this.target = target;
  }

  public void run(IPerfOutput output) throws Exception {
    final IRuntime runtime = new LoggerRuntime();
    ClassReader reader = new ClassReader(TargetLoader.getClassData(target));
    final Instrumenter instr = new Instrumenter(runtime);
    instr.instrument(reader);
    output.writeByteResult("instrumented class",
        instr.instrument(reader).length, reader.b.length);
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

    */
   public InputStream openStream()
   {
      try
      {
         IRuntime runtime = ArquillianRuntime.getInstance();
         Instrumenter instrumenter = new Instrumenter(runtime);
         byte[] instrumented = instrumenter.instrument(asset.openStream(), EX_STRING);
        
         return new ByteArrayInputStream(instrumented);
      }
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

    @SuiteScoped
    private InstanceProducer<IRuntime> runtimeInst;

    public void createRuntime(@Observes BeforeSuite event) throws Exception
    {
        IRuntime runtime = ArquillianRuntime.getInstance();
        runtimeInst.set(runtime);
    }
View Full Code Here

Examples of org.jacoco.core.runtime.IRuntime

    */
   public InputStream openStream()
   {
      try
      {
         IRuntime runtime = ArquillianRuntime.getInstance();
         Instrumenter instrumenter = new Instrumenter(runtime);
         byte[] instrumented = instrumenter.instrument(asset.openStream());
        
         return new ByteArrayInputStream(instrumented);
      }
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.