134 references to ParseCompilationUnit
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (4)
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 (54)
Syntax\SyntaxNodeTests.cs (34)
64var cls = SyntaxFactory.ParseCompilationUnit("class C { }").Members[0] as ClassDeclarationSyntax;
380var cu = SyntaxFactory.ParseCompilationUnit(text);
425Assert.False(SyntaxFactory.ParseCompilationUnit("").ContainsDirective(kind));
429Assert.False(SyntaxFactory.ParseCompilationUnit("namespace N { }").ContainsDirective(kind));
434var compilationUnit = SyntaxFactory.ParseCompilationUnit("namespace N { } #if false");
460testContainsHelper2(new[] { SyntaxKind.ShebangDirectiveTrivia }, SyntaxFactory.ParseCompilationUnit("#!command", options: TestOptions.Script));
461testContainsHelper2(new[] { SyntaxKind.ShebangDirectiveTrivia }, SyntaxFactory.ParseCompilationUnit(" #!command", options: TestOptions.Script));
462testContainsHelper2(new[] { SyntaxKind.ShebangDirectiveTrivia }, SyntaxFactory.ParseCompilationUnit("#!command", options: TestOptions.Regular));
463testContainsHelper2([SyntaxKind.IgnoredDirectiveTrivia], SyntaxFactory.ParseCompilationUnit("#:x"));
472testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit(directive));
475testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
481testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
487testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
495testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
504testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
513testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
528testContainsHelper2(directiveKinds, SyntaxFactory.ParseCompilationUnit($$"""
560var compilationUnit = SyntaxFactory.ParseCompilationUnit("""
2346var cu = SyntaxFactory.ParseCompilationUnit("private class C { }");
2364var cu = SyntaxFactory.ParseCompilationUnit("private class C { }");
2380var cu = SyntaxFactory.ParseCompilationUnit("public class C { }");
2395var cu = SyntaxFactory.ParseCompilationUnit("public class C { }");
2441var cu = SyntaxFactory.ParseCompilationUnit(text);
2797var cu = SyntaxFactory.ParseCompilationUnit("class C { void M() { } /* trivia */ }");
2813var cu = SyntaxFactory.ParseCompilationUnit(@"
2993var cu = SyntaxFactory.ParseCompilationUnit(@"class A { } class B { } // test");
3009var cu = SyntaxFactory.ParseCompilationUnit(@"class A { } class B { } #endregion");
3025var cu = SyntaxFactory.ParseCompilationUnit(@"
3170var cu = SyntaxFactory.ParseCompilationUnit(@"
3337var cu = SyntaxFactory.ParseCompilationUnit(@"
3605var node = SyntaxFactory.ParseCompilationUnit(" ");
3627var root = SyntaxFactory.ParseCompilationUnit(text);
3659var root = SyntaxFactory.ParseCompilationUnit(text);
4104action(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 (14)
Microsoft.Gen.ContextualOptions.Unit.Tests (5)
Microsoft.VisualStudio.LanguageServices.CSharp (1)