Esempio n. 1
0
        protected override void Initialize()
        {
            base.Initialize();

            CoverageBuilderMaxAggregator = new TaggedBranchCoverageBuilder <PexGeneratedTestName>();

            var assemblyName = this.Services.CurrentAssembly.Assembly.Assembly.ShortName;

            FieldAcccessFileName = InfoFileDirectory + assemblyName + ".fieldAccess.bin";
            InsufficientObjectFactoryFieldFileName      = InfoFileDirectory + assemblyName + ".insufficientFields.bin";
            insufficientFieldInfoWithBranchInfoFileName = InfoFileDirectory + assemblyName +
                                                          ".insufficientFields.branch.bin";
            FactoryMethodDebugFileName = InfoFileDirectory + assemblyName + ".factories.txt";

            FieldAccessInfoObj = (FieldAccessInfo)LoadFInfoFromFile(FieldAccessInfoObj, FieldAcccessFileName);

            if (FieldAccessInfoObj == null)
            {
                FieldAccessInfoObj = new FieldAccessInfo();
            }

            InsufficientObjectFactoryFieldInfoObj =
                (InsufficientObjectFactoryFieldInfo)
                LoadFInfoFromFile(InsufficientObjectFactoryFieldInfoObj, InsufficientObjectFactoryFieldFileName);
            if (InsufficientObjectFactoryFieldInfoObj == null)
            {
                InsufficientObjectFactoryFieldInfoObj = new InsufficientObjectFactoryFieldInfo();
            }

            insufficientFieldInfoWithBranchInfo = new InsufficientFieldInfoWithBranchInfo();
            int countRelevantFiles = InsufficientObjectFactoryFieldInfoObj.ReleventFields.Count;
        }
Esempio n. 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");
            }
        }
Esempio n. 3
0
        protected override void Initialize()
        {
            base.Initialize();

            CoverageBuilderMaxAggregator = new TaggedBranchCoverageBuilder<PexGeneratedTestName>();

            var assemblyName = this.Services.CurrentAssembly.Assembly.Assembly.ShortName;
            FieldAcccessFileName = InfoFileDirectory + assemblyName + ".fieldAccess.bin";
            InsufficientObjectFactoryFieldFileName = InfoFileDirectory + assemblyName + ".insufficientFields.bin";
            insufficientFieldInfoWithBranchInfoFileName = InfoFileDirectory + assemblyName +
                                                          ".insufficientFields.branch.bin";
            FactoryMethodDebugFileName = InfoFileDirectory + assemblyName + ".factories.txt";

            FieldAccessInfoObj = (FieldAccessInfo) LoadFInfoFromFile(FieldAccessInfoObj, FieldAcccessFileName);

            if (FieldAccessInfoObj == null)
            {
                FieldAccessInfoObj = new FieldAccessInfo();
            }

            InsufficientObjectFactoryFieldInfoObj =
                (InsufficientObjectFactoryFieldInfo)
                LoadFInfoFromFile(InsufficientObjectFactoryFieldInfoObj, InsufficientObjectFactoryFieldFileName);
            if (InsufficientObjectFactoryFieldInfoObj == null)
            {
                InsufficientObjectFactoryFieldInfoObj = new InsufficientObjectFactoryFieldInfo();
            }

            insufficientFieldInfoWithBranchInfo = new InsufficientFieldInfoWithBranchInfo();
            int countRelevantFiles = InsufficientObjectFactoryFieldInfoObj.ReleventFields.Count;
        }