コード例 #1
0
        public bool doTest()
        {
            Console.WriteLine();
            ReqDisplay.title("Req #6 - Find all strong components in the file collection");
            ReqDisplay.message("- In this program, Tarjan Algorithm is used to solve strong components.");

            string[] args = new string[] { "../../../DemoExecutive/Test/" };
            DemoExecutive.ShowCommandLine(args);
            List <string> files = DemoExecutive.ProcessCommandline(args);

            Repository repo = new Repository();

            repo.semi = Factory.create();

            BuildTypeAnalyzer builder = new BuildTypeAnalyzer(repo);
            Parser            parser  = builder.build();

            DemoExecutive.BuildTypeTable(args, files, repo);
            DemoExecutive.depAnalysis(args, files, repo);

            Console.Write("\n\nDependency Analysis:");
            Display.showDependency(repo.depGraph);

            Console.Write("\n");
            var strongComponents = TarjanSccSolver.DetectCycle(repo.depGraph);

            Display.showStrongComponents(strongComponents);

            return(true);
        }
コード例 #2
0
        public bool doTest()
        {
            Console.WriteLine();
            ReqDisplay.title("Req #8 - An automated unit test suite");
            ReqDisplay.message(message);
            string[] args = new string[] { "../../../DemoExecutive/SpecialTestCases/" };
            DemoExecutive.ShowCommandLine(args);
            List <string> files = DemoExecutive.ProcessCommandline(args);
            Repository    repo  = new Repository();

            repo.semi = Factory.create();
            DemoExecutive.BuildTypeTable(args, files, repo);
            Display.showTypeTable(repo.typeTable);
            Console.WriteLine();
            Display.showAliasTable(repo.aliasTable);
            Console.WriteLine();
            DemoExecutive.depAnalysis(args, files, repo);
            Console.Write("\n\nDependency Analysis:");
            Display.showDependency(repo.depGraph);
            Console.Write("\n");
            var strongComponents = TarjanSccSolver.DetectCycle(repo.depGraph);

            Display.showStrongComponents(strongComponents);
            return(true);
        }
コード例 #3
0
        public bool doTest()
        {
            Console.WriteLine();
            ReqDisplay.title("Req #5 - Identify the user-defined types in the specified set of files");
            ReqDisplay.message("- This program could dentify all of the Types defined within that code, " +
                               "\n    e.g., interfaces, classes, structs, enums, and delegates.");


            string[] args = new string[] { "../../../DemoExecutive/Test/" };
            DemoExecutive.ShowCommandLine(args);
            List <string> files = DemoExecutive.ProcessCommandline(args);

            Repository repo = new Repository();

            repo.semi = Factory.create();

            DemoExecutive.BuildTypeTable(args, files, repo);

            Display.showTypeTable(repo.typeTable);
            Console.WriteLine();
            Display.showAliasTable(repo.aliasTable);
            Console.WriteLine();
            return(true);
        }