Пример #1
0
  public SelectionData selectTests(String methodName, Edge[] dangerousEdges)
      throws MethodNotFoundException {
    TestHistory th = thHandler.getTestHistory(methodName);
    int maxTestID = th.getHighestTestID();
    TIntArrayList testList = new TIntArrayList();

    for (int i = 0; i < dangerousEdges.length; i++) {
      // int predBlockID = dangerousEdges[i].getPredNodeID();
      int succBlockID = dangerousEdges[i].getSuccNodeID();

      for (int j = 0; j < maxTestID; j++) {
        if (
        /*th.query(predBlockID, j) &&*/ th.query(succBlockID, j)) {
          testList.add(j + 1);
        }
      }
    }

    SelectionData sd = new SelectionData();
    if (testList.size() > 0) {
      sd.tests = testList.toNativeArray();
    } else {
      sd.tests = new int[0];
    }

    return sd;
  }