示例#1
0
 protected override void Initialize()
 {
     base.Initialize();
     assemblyName                                = this.Services.CurrentAssembly.Assembly.Assembly.ShortName;
     InfoFileDirectory                           = "c:\\tempSeqex\\" + assemblyName + "\\";
     PexObjectIssueFileName                      = InfoFileDirectory + assemblyName + ".object.bin";
     externalMethodProblemFileName               = InfoFileDirectory + assemblyName + ".uninstrumented.bin";
     instructionCovFileName                      = InfoFileDirectory + assemblyName + ".instructionCov.bin";
     basicBlockOffsetFileName                    = InfoFileDirectory + assemblyName + ".basicBlockOffset.bin";
     exceptionExternalMethodsFileName            = InfoFileDirectory + assemblyName + ".exceptionExternalMethods.bin";
     boundaryIssueFileName                       = InfoFileDirectory + assemblyName + ".boundaryIssue.bin";
     targetObjectTypeFileName                    = InfoFileDirectory + assemblyName + ".targetObjectType.bin";
     foundObjectTypeFileName                     = InfoFileDirectory + assemblyName + ".foundObjectType.bin";
     foundUninstrumentedInObjectCreationFileName = InfoFileDirectory + assemblyName + ".uninstrumentObj.bin";
     problemIssueFileName                        = InfoFileDirectory + assemblyName + ".problem.txt";
     xmlFileDirectory                            = InfoFileDirectory + "xml\\";
     coverageDetailsFileName                     = xmlFileDirectory + assemblyName + ".coverageDetails";
     issueWithBranchesFileName                   = xmlFileDirectory + assemblyName + ".problems";
     uncoveredBranchFileName                     = InfoFileDirectory + assemblyName + ".uncoveredBranch.txt";
     testFileName                                = InfoFileDirectory + assemblyName + ".test.txt";
     assemblyCovFileName                         = InfoFileDirectory + assemblyName + ".assembly.bin";
     logFileName            = InfoFileDirectory + assemblyName + ".log.txt";
     errorLogFileName       = InfoFileDirectory + assemblyName + ".errorLog.txt";
     resultTrackingFileName = InfoFileDirectory + assemblyName + ".resultTrack.bin";
     candidateObjectCreationIssueFileName = InfoFileDirectory + assemblyName +
                                            ".candidateObjectCreationIssue.bin";
     currentReportPathFileName = "c:\\tempSeqex\\" + "currentPath.txt";
     _issueInfo                       = new ProblemInfo();
     _nonCoveredBranchInfo            = new NonCoveredBranchInfo();
     ExternalMethodInBranch           = new Dictionary <Method, HashSet <CodeLocation> >();
     _candidateObjectCreationProblems = new HashSet <CandidateObjectCreationProblem>();
 }
示例#2
0
        private void LoadInfosFromFiles()
        {
            infoDirectory = "c:\\tempSeqex\\" + txtAssemblyName.Text + "\\";
            assemblyName = txtAssemblyName.Text;

            objectCreationProblemFileName = infoDirectory + assemblyName + ".object.bin";
            notCoveredBranchFileName = infoDirectory + assemblyName + ".assembly.bin";
            insufficientObjectFactoryFieldInfoFileName = infoDirectory + assemblyName + ".insufficientFields.bin";
            insufficientFieldInfoWithBranchInfoFileName = infoDirectory + assemblyName +
                                                          ".insufficientFields.branch.bin";
            resultTrackingInfoFileName = infoDirectory + assemblyName + ".resultTrack.bin";
            candidateObjectCreationProblemFileName = infoDirectory + assemblyName + ".candidateObjectCreationIssue.bin";
            uninstrumentedMethodProblemFileName = infoDirectory + assemblyName + ".uninstrumented.bin";
            foundUninstrumentedInObjectCreationFileName = infoDirectory + assemblyName + ".uninstrumentObj.bin";
            exceptionExternalMethodsFileName = infoDirectory + assemblyName + ".exceptionExternalMethods.bin";
            foundObjectTypeFileName = infoDirectory + assemblyName + ".foundObjectType.bin";

            insufficientObjectFactoryFieldInfo =
                (InsufficientObjectFactoryFieldInfo) LoadInfoFromFile(insufficientObjectFactoryFieldInfo,
                                                                      insufficientObjectFactoryFieldInfoFileName);
            _problemInfo =
                (ProblemInfo) LoadInfoFromFile(_problemInfo, objectCreationProblemFileName);
            _nonCoveredBranchInfo =
                (NonCoveredBranchInfo) LoadInfoFromFile(_nonCoveredBranchInfo, notCoveredBranchFileName);
            insufficientFieldInfoWithBranchInfo =
                (InsufficientFieldInfoWithBranchInfo) LoadInfoFromFile(insufficientObjectFactoryFieldInfo,
                                                                       insufficientFieldInfoWithBranchInfoFileName);
            resultTrackingInfo = (ResultTrackingInfo) LoadInfoFromFile(resultTrackingInfo, resultTrackingInfoFileName);

            unInstrumentedMethodNames =
                (List<string>) LoadInfoFromFile(unInstrumentedMethodNames, uninstrumentedMethodProblemFileName);

            _candidateObjectCreationProblems =
                (HashSet<CandidateObjectCreationProblem>) LoadInfoFromFile(_candidateObjectCreationProblems,
                                                                         candidateObjectCreationProblemFileName);

            uninstrumentedMethodsFoundInObj =
                (Dictionary<string, HashSet<BranchInfo>>) LoadInfoFromFile(uninstrumentedMethodsFoundInObj,
                                                                           foundUninstrumentedInObjectCreationFileName);

            ExceptionExternalMethods =
                (HashSet<ExceptionExternalMethod>)
                LoadInfoFromFile(ExceptionExternalMethods, exceptionExternalMethodsFileName);

            FoundTypes = (HashSet<string>) LoadInfoFromFile(FoundTypes, foundObjectTypeFileName);
            if (FoundTypes != null && FoundTypes.Contains("System.Object"))
            {
                FoundTypes.Remove("System.Object");
            }
        }
 protected override void Initialize()
 {
     base.Initialize();
     assemblyName = this.Services.CurrentAssembly.Assembly.Assembly.ShortName;
     InfoFileDirectory = "c:\\tempSeqex\\" + assemblyName + "\\";
     PexObjectIssueFileName = InfoFileDirectory + assemblyName + ".object.bin";
     externalMethodProblemFileName = InfoFileDirectory + assemblyName + ".uninstrumented.bin";
     instructionCovFileName = InfoFileDirectory + assemblyName + ".instructionCov.bin";
     basicBlockOffsetFileName = InfoFileDirectory + assemblyName + ".basicBlockOffset.bin";
     exceptionExternalMethodsFileName = InfoFileDirectory + assemblyName + ".exceptionExternalMethods.bin";
     boundaryIssueFileName = InfoFileDirectory + assemblyName + ".boundaryIssue.bin";
     targetObjectTypeFileName = InfoFileDirectory + assemblyName + ".targetObjectType.bin";
     foundObjectTypeFileName = InfoFileDirectory + assemblyName + ".foundObjectType.bin";
     foundUninstrumentedInObjectCreationFileName = InfoFileDirectory + assemblyName + ".uninstrumentObj.bin";
     problemIssueFileName = InfoFileDirectory + assemblyName + ".problem.txt";
     xmlFileDirectory = InfoFileDirectory + "xml\\";
     coverageDetailsFileName = xmlFileDirectory + assemblyName + ".coverageDetails";
     issueWithBranchesFileName = xmlFileDirectory + assemblyName + ".problems";
     uncoveredBranchFileName = InfoFileDirectory + assemblyName + ".uncoveredBranch.txt";
     testFileName = InfoFileDirectory + assemblyName + ".test.txt";
     assemblyCovFileName = InfoFileDirectory + assemblyName + ".assembly.bin";
     logFileName = InfoFileDirectory + assemblyName + ".log.txt";
     errorLogFileName = InfoFileDirectory + assemblyName + ".errorLog.txt";
     resultTrackingFileName = InfoFileDirectory + assemblyName + ".resultTrack.bin";
     candidateObjectCreationIssueFileName = InfoFileDirectory + assemblyName +
                                            ".candidateObjectCreationIssue.bin";
     currentReportPathFileName = "c:\\tempSeqex\\" + "currentPath.txt";
     _issueInfo = new ProblemInfo();
     _nonCoveredBranchInfo = new NonCoveredBranchInfo();
     ExternalMethodInBranch = new Dictionary<Method, HashSet<CodeLocation>>();
     _candidateObjectCreationProblems = new HashSet<CandidateObjectCreationProblem>();
 }