コード例 #1
0
  private void dumpConditions(LineData lineData) {
    increaseIndentation();
    println("<conditions>");

    for (int i = 0; i < lineData.getConditionSize(); i++) {
      Object conditionData = lineData.getConditionData(i);
      String coverage = lineData.getConditionCoverage(i);
      dumpCondition(conditionData, coverage);
    }

    println("</conditions>");
    decreaseIndentation();
  }
コード例 #2
0
  private void dumpLine(LineData lineData) {
    int lineNumber = lineData.getLineNumber();
    long hitCount = lineData.getHits();
    boolean hasBranch = lineData.hasBranch();
    String conditionCoverage = lineData.getConditionCoverage();

    String lineInfo =
        "<line number=\""
            + lineNumber
            + "\" hits=\""
            + hitCount
            + "\" branch=\""
            + hasBranch
            + "\"";
    if (hasBranch) {
      println(lineInfo + " condition-coverage=\"" + conditionCoverage + "\">");
      dumpConditions(lineData);
      println("</line>");
    } else {
      println(lineInfo + "/>");
    }
  }