Package org.cishell.testing.convertertester.core.tester2.graphcomparison

Examples of org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer


       
        Set tests = testToPassesToCafs.keySet();
       
        Iterator testIter = tests.iterator();
        while (testIter.hasNext()) {
          TestResult test = (TestResult) testIter.next();
         
          report.println(test.getName());
         
          Map passToCafs
            = (Map) testToPassesToCafs.get(test);
         
          Set passes = passToCafs.keySet();
View Full Code Here


  private Map categorizeByTestAndPass(List cafList) {
    Map testToPassesToCafs = new HashMap();
    for (int ii = 0; ii < cafList.size(); ii++) {
      ChanceAtFault caf = (ChanceAtFault) cafList.get(ii)
      FilePassResult pass = caf.getFailedFilePass();
      TestResult test = pass.getParent();
     
      Map passToCafs;
      List cafs;
     
      passToCafs = (Map) testToPassesToCafs.get(test);
View Full Code Here

   
    Set tests = testToPassesToCafs.keySet();
   
    Iterator testIter = tests.iterator();
    while (testIter.hasNext()) {
      TestResult test = (TestResult) testIter.next();
     
      Map passToCafs
        = (Map) testToPassesToCafs.get(test);
     
      Set passes = passToCafs.keySet();
View Full Code Here

        for (int kk = 0; kk < filteredTestConvs.length; kk++) {
          System.out.println("Running converter path " + kk);
          numTestsSoFar++;
          ConverterPath testConv = filteredTestConvs[kk];
         
          TestResult testResult =
            runATest(testConv, compareConv, cContext, bContext,
                numTestsSoFar);
         
          if (testResult != null) {
            testResults.add(testResult);
View Full Code Here

       
        //run the test
        FilePassResult[] results = this.testRunner.runTest(testBasicData);    
       
        //return the results of the test
        return new TestResult(results, testConvs, compareConvs,
            numTestsSoFar);   
  }
View Full Code Here

              logText;
          } else {
            explanation += "No errors logged. Cause unknown. \r\n";
          }
         
          ConvFailureInfo failInfo = new ConvFailureInfo(
              explanation, converter);
         
          ConvertResult result = new ConvertResult(
            failInfo, (Data[][]) dataSoFar.toArray(new Data[dataSoFar.size()][]));

          return result;
        }
      }
    } catch (Throwable t) {
      ConvFailureInfo failInfo = new ConvFailureInfo(getStackTrace(t), currentConverter);
      ConvertResult result = new ConvertResult(
        failInfo,(Data[][]) dataSoFar.toArray(new Data[dataSoFar.size()][]));

      return result;
    }
View Full Code Here

      ConvertResult testPhaseResult = convert(originalFileData, testConverters, testData);
      Data[][] allDataFromTestPhase = testPhaseResult.getAllData();
     
      if (!testPhaseResult.succeeded()) {
        FilePassFailure failure = createFailResult(
          originalFileData,
          PassPhase.TEST_CONV_PHASE,
          testPhaseResult.getFailInfo(),
          allDataFromTestPhase,
          null,
          null);
        testResults.add(failure);
        continue;
      }

      Data[] resultFileData = testPhaseResult.getResult();
   
     
      // comparison conversion (for original file) phase

      ConvertResult comparePhaseOrigResult = convert(originalFileData,
          comparisonConverters, testData);

      Data[][] allDataFromOrigComparePhase = comparePhaseOrigResult.getAllData();
     
      if (!comparePhaseOrigResult.succeeded()) {
        FilePassFailure failure = createFailResult(originalFileData,
            PassPhase.COMPARE_CONV_ORIG_PHASE,
            comparePhaseOrigResult.getFailInfo(),
            allDataFromTestPhase,
            allDataFromOrigComparePhase,
            null);
        testResults.add(failure);
        continue;
      }
      Data[] originalInMemory = comparePhaseOrigResult.getResult();
   
     
      //comparison conversion (for result file) phase
     
      ConvertResult comparePhaseResultResult = convert(resultFileData,
          comparisonConverters, testData);

      Data[][] allDataFromResultComparePhase = comparePhaseResultResult.getAllData();
     
      if (!comparePhaseResultResult.succeeded()) {
        FilePassFailure failure = createFailResult(originalFileData,
            PassPhase.COMPARE_CONV_RESULT_PHASE,
            comparePhaseResultResult.getFailInfo(),
            allDataFromTestPhase,
            allDataFromOrigComparePhase,
            allDataFromResultComparePhase);
        testResults.add(failure);
        continue;
      }
      Data[] resultInMemory = comparePhaseResultResult.getResult();
   

      // graph comparison phase

      Graph resultGraph = (Graph) originalInMemory[0].getData();
      Graph origGraph = (Graph) resultInMemory[0].getData();

      NewGraphComparer comparer = testData.getComparer();
      ComparisonResult graphComparisonPhaseResult = comparer.compare(
          origGraph, resultGraph);

      if (!graphComparisonPhaseResult.comparisonSucceeded()) {
        String explanation =
          graphComparisonPhaseResult.getLog();
        FilePassFailure failure = createFailResult(originalFileData,
            explanation, PassPhase.GRAPH_COMPARE_PHASE,
            null,
            allDataFromTestPhase,
            allDataFromOrigComparePhase,
            allDataFromResultComparePhase);
View Full Code Here

  }
 
  private FilePassFailure createFailResult(Data[] origData,
      String explanation, PassPhase lastReachedPhase,
      Converter failedConverter, Data[][] testData, Data[][] origCompareData, Data[][] resultCompareData) {
    FilePassFailure failure = new FilePassFailure(origData, explanation,
        lastReachedPhase, failedConverter, testData, origCompareData, resultCompareData);
    return failure;
  }
View Full Code Here

    this.chanceAtFaults = new ArrayList();
    this.uniqueExplnChanceAtFaults = new ArrayList();
   
    Iterator iter = this.failedInvolvedPasses.iterator();
    while (iter.hasNext()) {
      FilePassFailure failFP = (FilePassFailure) iter.next();
     
      ChanceAtFault chanceAtFault =
        failFP.getChanceAtFaultFor(this.conv);
     
      //add to list for all involved chance at faults
      this.chanceAtFaults.add(chanceAtFault);
     
      /*
 
View Full Code Here

  }
 
  public String[] getErrorSource() {
    Set errorSources = new HashSet();
    for (int ii = 0; ii < associatedFPs.length; ii++) {
      FilePassFailure fp = associatedFPs[ii];
      errorSources.add(fp.getFailedConverter());
    }
   
    return (String[]) errorSources.toArray(new String[0]);
  }
View Full Code Here

TOP

Related Classes of org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer

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.