577 references to SyntaxTrees
AnalyzerRunner (1)
BuildValidator (1)
IdeCoreBenchmarks (2)
Microsoft.CodeAnalysis (9)
Microsoft.CodeAnalysis.CodeStyle (3)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (16)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (230)
SourceGeneration\GeneratorDriverTests.cs (81)
38Assert.Single(compilation.SyntaxTrees);
44Assert.Single(outputCompilation.SyntaxTrees);
58Assert.Single(compilation.SyntaxTrees);
80Assert.Single(compilation.SyntaxTrees);
101Assert.Single(compilation.SyntaxTrees);
130Assert.Single(compilation.SyntaxTrees);
137Assert.Equal(2, outputCompilation.SyntaxTrees.Count());
220Assert.Single(compilation.SyntaxTrees);
229Assert.Equal(2, outputCompilation1.SyntaxTrees.Count());
230Assert.Equal(2, outputCompilation2.SyntaxTrees.Count());
231Assert.Equal(2, outputCompilation3.SyntaxTrees.Count());
256Assert.Single(compilation.SyntaxTrees);
277Assert.Single(compilation.SyntaxTrees);
303Assert.Single(compilation.SyntaxTrees);
311Assert.Single(outputCompilation.SyntaxTrees);
324Assert.Single(compilation.SyntaxTrees);
350Assert.Single(compilation.SyntaxTrees);
361Assert.Equal(2, outputCompilation.SyntaxTrees.Count());
387Assert.Single(compilation.SyntaxTrees);
417Assert.Single(compilation.SyntaxTrees);
442Assert.Single(compilation.SyntaxTrees);
468Assert.Single(compilation.SyntaxTrees);
485Assert.Equal(2, outputCompilation.SyntaxTrees.Count());
497Assert.Single(compilation.SyntaxTrees);
526Assert.Equal(1, outputCompilation.SyntaxTrees.Count());
538Assert.Single(compilation.SyntaxTrees);
547Assert.Equal(3, outputCompilation.SyntaxTrees.Count());
549var filePaths = outputCompilation.SyntaxTrees.Skip(1).Select(t => t.FilePath).ToArray();
576Assert.Single(compilation.SyntaxTrees);
606Assert.Single(compilation.SyntaxTrees);
651Assert.Single(compilation.SyntaxTrees);
698Assert.Single(compilation.SyntaxTrees);
734Assert.Single(compilation.SyntaxTrees);
770Assert.Single(compilation.SyntaxTrees);
794Assert.Single(compilation.SyntaxTrees);
819Assert.Single(compilation.SyntaxTrees);
847Assert.Single(compilation.SyntaxTrees);
879Assert.Single(compilation.SyntaxTrees);
892Assert.Equal(2, outputCompilation.SyntaxTrees.Count());
905Assert.Single(compilation.SyntaxTrees);
932Assert.Single(compilation.SyntaxTrees);
960Assert.Single(compilation.SyntaxTrees);
992Assert.Single(compilation.SyntaxTrees);
1006Assert.Single(compilation.SyntaxTrees);
1024Assert.Single(compilation.SyntaxTrees);
1044Assert.Single(compilation.SyntaxTrees);
1061Assert.Single(compilation.SyntaxTrees);
1088Assert.Single(compilation.SyntaxTrees);
1133Assert.Single(compilation.SyntaxTrees);
1161Assert.Single(compilation.SyntaxTrees);
1259Assert.Single(compilation.SyntaxTrees);
1271c.ReportDiagnostic(d.WithLocation(Location.Create(c.Compilation.SyntaxTrees.First(), l)));
1377Assert.Single(compilation.SyntaxTrees);
1412Assert.Single(compilation.SyntaxTrees);
1434Assert.Single(compilation.SyntaxTrees);
1459Assert.Single(compilation.SyntaxTrees);
1484Assert.Single(compilation.SyntaxTrees);
1513Assert.Single(compilation.SyntaxTrees);
1546Assert.Single(compilation.SyntaxTrees);
1567Assert.Single(compilation.SyntaxTrees);
1574Assert.Equal(2, outputCompilation.SyntaxTrees.Count());
1629Assert.Single(compilation.SyntaxTrees);
1673Assert.Single(compilation.SyntaxTrees);
1892Assert.Single(compilation.SyntaxTrees);
1928Assert.Single(compilation.SyntaxTrees);
2066Assert.Single(compilation.SyntaxTrees);
2101Assert.Single(compilation.SyntaxTrees);
2146var c2 = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.First(), CSharpSyntaxTree.ParseText("class E{}", parseOptions));
2173Assert.Single(compilation.SyntaxTrees);
2201Assert.Single(compilation.SyntaxTrees);
2260Assert.Single(compilation.SyntaxTrees);
2294Assert.True(compilation.SyntaxTrees.Contains(node.SyntaxTree));
2322Assert.Single(compilation.SyntaxTrees);
2405Assert.Single(compilation.SyntaxTrees);
2592Assert.Single(compilation.SyntaxTrees);
2782Assert.Single(compilation.SyntaxTrees);
2827Assert.Single(compilation.SyntaxTrees);
2873Assert.Single(compilation.SyntaxTrees);
2907Assert.Single(compilation.SyntaxTrees);
2957Assert.Single(compilation.SyntaxTrees);
3373Assert.Single(compilation.SyntaxTrees);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (107)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.UnitTests (7)
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.Rebuild.UnitTests (3)
Microsoft.CodeAnalysis.Test.Utilities (10)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (12)
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (63)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (13)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces (5)
Microsoft.CodeAnalysis.Workspaces.UnitTests (58)
SolutionTests\SolutionWithSourceGeneratorTests.cs (25)
56var generatedTree = Assert.Single(newCompilation.SyntaxTrees);
83Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees);
88Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees);
93Assert.Empty((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees);
131Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees);
136Assert.Equal(2, (await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees.Count());
141Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees);
158Assert.Equal(2, (await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees.Count());
183Assert.Equal(2, compilation.SyntaxTrees.Count());
202Assert.Equal(2, compilation.SyntaxTrees.Count());
227Assert.Equal(3, compilation.SyntaxTrees.Count());
262Assert.Contains(regularDocumentSyntaxTree, compilation.SyntaxTrees);
264var generatedSyntaxTree = Assert.Single(compilation.SyntaxTrees.Where(t => t != regularDocumentSyntaxTree));
314foreach (var tree in compilation.SyntaxTrees)
317var texts = compilation.SyntaxTrees.Select(t => t.GetText().ToString());
334Assert.Equal(2, fullCompilation.SyntaxTrees.Count());
416Assert.NotEmpty(compilationWithGenerator.SyntaxTrees);
429var syntaxTree = Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees);
452var syntaxTree = Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees, t => t.FilePath != "RegularDocument.cs");
586Assert.Contains(generatedTree, compilation.SyntaxTrees);
633Assert.Contains(generatedTree, compilation.SyntaxTrees);
664Assert.Contains(generatedTree, compilationReference.Compilation.SyntaxTrees);
747Assert.Equal(2, compilation.SyntaxTrees.Count());
779Assert.Single(compilation.SyntaxTrees);
794onExecute: context => noTreesPassed = context.Compilation.SyntaxTrees.Any()));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)