Exemple #1
0
        public void TestCSharpFileGetsCCCParserAsFunctionStream()
        {
            string filename   = "myCode.cs";
            var    langParser = LookAheadLangParser.CreateCppParser(new StreamReader(new MemoryStream()));

            IFunctionStream functionStream = FileAnalyzer.CreateFunctionStream(langParser, filename, false);

            Assert.IsNotNull(functionStream);
            Assert.IsTrue(functionStream is CCCParser);
        }
Exemple #2
0
        public void TestJavascriptFileGetsJSParserAsFunctionStream()
        {
            string filename   = "test.js";
            var    langParser = LookAheadLangParser.CreateCppParser(new StreamReader(new MemoryStream()));

            IFunctionStream functionStream = FileAnalyzer.CreateFunctionStream(langParser, filename, false);

            Assert.IsNotNull(functionStream);
            Assert.IsTrue(functionStream is JSParser);
        }