Examples of ILine


Examples of org.jacoco.core.analysis.ILine

  private static void writeLines(final ISourceNode source,
      final XMLElement parent) throws IOException {
    final int last = source.getLastLine();
    for (int nr = source.getFirstLine(); nr <= last; nr++) {
      final ILine line = source.getLine(nr);
      if (line.getStatus() != ICounter.EMPTY) {
        final XMLElement element = parent.element("line");
        element.attr("nr", nr);
        writeCounter(element, "mi", "ci", line.getInstructionCounter());
        writeCounter(element, "mb", "cb", line.getBranchCounter());
      }
    }
  }
View Full Code Here

Examples of org.jacoco.core.analysis.ILine

    result = analyzer.getCoverage();
  }

  private void assertLine(int nr, int insnMissed, int insnCovered,
      int branchesMissed, int branchesCovered) {
    final ILine line = result.getLine(nr);
    assertEquals("Instructions in line " + nr,
        CounterImpl.getInstance(insnMissed, insnCovered),
        line.getInstructionCounter());
    assertEquals("Branches in line " + nr,
        CounterImpl.getInstance(branchesMissed, branchesCovered),
        line.getBranchCounter());
  }
View Full Code Here

Examples of org.jacoco.core.analysis.ILine

    clear(event);
    int firstline = linecoverage.getFirstLine();
    int lastline = linecoverage.getLastLine();
    try {
      for (int l = firstline; l <= lastline; l++) {
        final ILine line = linecoverage.getLine(l);
        if (line.getStatus() != ICounter.EMPTY) {
          IRegion region = document.getLineInformation(l - 1);
          int docoffset = region.getOffset();
          int doclength = region.getLength();
          CoverageAnnotation ca = new CoverageAnnotation(docoffset, doclength,
              line);
View Full Code Here

Examples of org.jacoco.core.analysis.ILine

  private static void writeLines(final ISourceNode source,
      final XMLElement parent) throws IOException {
    final int last = source.getLastLine();
    for (int nr = source.getFirstLine(); nr <= last; nr++) {
      final ILine line = source.getLine(nr);
      if (line.getStatus() != ICounter.EMPTY) {
        final XMLElement element = parent.element("line");
        element.attr("nr", nr);
        writeCounter(element, "mi", "ci", line.getInstructionCounter());
        writeCounter(element, "mb", "cb", line.getBranchCounter());
      }
    }
  }
View Full Code Here

Examples of org.jacoco.core.analysis.ILine

    final int firstLine = child.getFirstLine();
    if (firstLine != UNKNOWN_LINE) {
      final int lastLine = child.getLastLine();
      ensureCapacity(firstLine, lastLine);
      for (int i = firstLine; i <= lastLine; i++) {
        final ILine line = child.getLine(i);
        incrementLine(line.getInstructionCounter(),
            line.getBranchCounter(), i);
      }
    }
  }
View Full Code Here

Examples of org.jacoco.core.analysis.ILine

  }

  @Override
  public boolean equals(final Object obj) {
    if (obj instanceof ILine) {
      final ILine that = (ILine) obj;
      return this.instructions.equals(that.getInstructionCounter())
          && this.branches.equals(that.getBranchCounter());
    }
    return false;
  }
View Full Code Here

Examples of org.jacoco.core.analysis.ILine

    sourceCoverage = files.iterator().next();
  }

  protected void assertLine(final String tag, final int status) {
    final int nr = source.getLineNumber(tag);
    final ILine line = sourceCoverage.getLine(nr);
    final String msg = String.format("Status in line %s: %s",
        Integer.valueOf(nr), source.getLine(nr));
    final int insnStatus = line.getInstructionCounter().getStatus();
    assertEquals(msg, STATUS_NAME[status], STATUS_NAME[insnStatus]);
  }
View Full Code Here

Examples of org.jacoco.core.analysis.ILine

  }

  protected void assertLine(final String tag, final int missedBranches,
      final int coveredBranches) {
    final int nr = source.getLineNumber(tag);
    final ILine line = sourceCoverage.getLine(nr);
    final String msg = String.format("Branches in line %s: %s",
        Integer.valueOf(nr), source.getLine(nr));
    assertEquals(msg + " branches",
        CounterImpl.getInstance(missedBranches, coveredBranches),
        line.getBranchCounter());
  }
View Full Code Here

Examples of org.jacoco.core.analysis.ILine

    result = analyzer.getCoverage();
  }

  private void assertLine(int nr, int insnMissed, int insnCovered,
      int branchesMissed, int branchesCovered) {
    final ILine line = result.getLine(nr);
    assertEquals("Instructions in line " + nr,
        CounterImpl.getInstance(insnMissed, insnCovered),
        line.getInstructionCounter());
    assertEquals("Branches in line " + nr,
        CounterImpl.getInstance(branchesMissed, branchesCovered),
        line.getBranchCounter());
  }
View Full Code Here

Examples of org.jacoco.core.analysis.ILine

    result = analyzer.getCoverage();
  }

  private void assertLine(int nr, int insnMissed, int insnCovered,
      int branchesMissed, int branchesCovered) {
    final ILine line = result.getLine(nr);
    assertEquals("Instructions in line " + nr,
        CounterImpl.getInstance(insnMissed, insnCovered),
        line.getInstructionCounter());
    assertEquals("Branches in line " + nr,
        CounterImpl.getInstance(branchesMissed, branchesCovered),
        line.getBranchCounter());
  }
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.