124 references to ParseCompilationUnit
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (49)
Syntax\SyntaxNodeTests.cs (33)
64var cls = SyntaxFactory.ParseCompilationUnit("class C { }").Members[0] as ClassDeclarationSyntax;
306var cu = SyntaxFactory.ParseCompilationUnit(text);
351Assert.False(SyntaxFactory.ParseCompilationUnit("").ContainsDirective(kind));
355Assert.False(SyntaxFactory.ParseCompilationUnit("namespace N { }").ContainsDirective(kind));
360var compilationUnit = SyntaxFactory.ParseCompilationUnit("namespace N { } #if false");
387testContainsHelper2(new[] { SyntaxKind.ShebangDirectiveTrivia }, SyntaxFactory.ParseCompilationUnit("#!command", options: TestOptions.Script));
388testContainsHelper2(new[] { SyntaxKind.BadDirectiveTrivia }, SyntaxFactory.ParseCompilationUnit(" #!command", options: TestOptions.Script));
389testContainsHelper2(new[] { SyntaxKind.BadDirectiveTrivia }, SyntaxFactory.ParseCompilationUnit("#!command", options: TestOptions.Regular));
398testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit(directive));
401testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
407testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
413testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
421testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
430testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
439testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
454testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
486var compilationUnit = SyntaxFactory.ParseCompilationUnit("""
2272var cu = SyntaxFactory.ParseCompilationUnit("private class C { }");
2290var cu = SyntaxFactory.ParseCompilationUnit("private class C { }");
2306var cu = SyntaxFactory.ParseCompilationUnit("public class C { }");
2321var cu = SyntaxFactory.ParseCompilationUnit("public class C { }");
2367var cu = SyntaxFactory.ParseCompilationUnit(text);
2723var cu = SyntaxFactory.ParseCompilationUnit("class C { void M() { } /* trivia */ }");
2739var cu = SyntaxFactory.ParseCompilationUnit(@"
2919var cu = SyntaxFactory.ParseCompilationUnit(@"class A { } class B { } // test");
2935var cu = SyntaxFactory.ParseCompilationUnit(@"class A { } class B { } #endregion");
2951var cu = SyntaxFactory.ParseCompilationUnit(@"
3096var cu = SyntaxFactory.ParseCompilationUnit(@"
3263var cu = SyntaxFactory.ParseCompilationUnit(@"
3531var node = SyntaxFactory.ParseCompilationUnit(" ");
3553var root = SyntaxFactory.ParseCompilationUnit(text);
3585var root = SyntaxFactory.ParseCompilationUnit(text);
4030action(SyntaxFactory.ParseCompilationUnit(test.Key), test.Value);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (25)
Microsoft.CodeAnalysis.Features.UnitTests (1)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
Microsoft.Gen.ContextualOptions.Unit.Tests (5)
Microsoft.VisualStudio.LanguageServices.CSharp (1)