896 references to ToFullString
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Microsoft.CodeAnalysis (5)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (27)
FlowAnalysis\RegionAnalysisTests.cs (8)
4426var index = tree.GetCompilationUnitRoot().ToFullString().IndexOf(".Class)", StringComparison.Ordinal);
6315var statement = GetFirstNode<StatementSyntax>(tree, root.ToFullString().IndexOf("S<object> o", StringComparison.Ordinal));
6354var statement = GetLastNode<StatementSyntax>(tree, root.ToFullString().IndexOf("if", StringComparison.Ordinal));
6355Assert.Equal("if (args == null) {}", statement.ToFullString());
6381var statement = GetLastNode<StatementSyntax>(tree, root.ToFullString().IndexOf("EditorOperations", StringComparison.Ordinal));
6426Assert.Equal(expectedtext, statement.ToFullString());
6447var statement = GetFirstNode<StatementSyntax>(tree, root.ToFullString().IndexOf("P = new object()", StringComparison.Ordinal));
6482var expression = GetLastNode<ExpressionSyntax>(tree, root.ToFullString().IndexOf("value ", StringComparison.Ordinal));
Semantics\CollectionExpressionTests.cs (15)
4810Assert.Equal("Program.AsCollection([1, 2, 3])", invocation.ToFullString());
14513Assert.Equal("(MyCollection<int>?)[1, 2, 3]", cast.ToFullString());
14518Assert.Equal("[1, 2, 3]", value.ToFullString());
14637Assert.Equal("(MyCollection<int>)/*<bind>*/[1, 2, 3]/*</bind>*/", cast.ToFullString());
14642Assert.Equal("[1, 2, 3]/*</bind>*/", value.ToFullString());
14720Assert.Equal("[2]", nestedCollection.ToFullString());
14809Assert.Equal("[2]", nestedCollection.ToFullString());
32388Assert.Equal("[element]", collection.ToFullString());
32394Assert.Equal("element", element.ToFullString());
32485Assert.Equal("element1", element1.ToFullString());
32491Assert.Equal("element2", element2.ToFullString());
32527Assert.Equal("(string?)element1", element1.ToFullString());
32533Assert.Equal("element2", element2.ToFullString());
32572Assert.Equal("element1", element1.ToFullString());
32578Assert.Equal("element2", element2.ToFullString());
Microsoft.CodeAnalysis.CSharp.Features (4)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (13)
SourceGeneration\GeneratorDriverTests.cs (6)
4306var generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator1"); }); }).AsSourceGenerator();
4307var generator2 = new PipelineCallbackGenerator2((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator2"); }); }).AsSourceGenerator();
4351var generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", "//" + c.SyntaxTrees.First().GetRoot().ToFullString() + " generator1"); }); }).AsSourceGenerator();
4352var generator2 = new PipelineCallbackGenerator2((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", "//" + c.SyntaxTrees.First().GetRoot().ToFullString() + " generator2"); }); }).AsSourceGenerator();
4375var generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator1"); }); }).AsSourceGenerator();
4376var generator2 = new PipelineCallbackGenerator2((ctx) => { initWasCalled = true; ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator2"); }); }).AsSourceGenerator();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (26)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (16)
429var node = root.FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("public event D Iter3", StringComparison.Ordinal)).Parent as BasePropertyDeclarationSyntax;
3314var paramNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("param1", StringComparison.Ordinal)).Parent;
3341var paramNode = root.FindToken(root.ToFullString().IndexOf('x')).Parent;
3367var paramNode = root.FindToken(root.ToFullString().IndexOf('x')).Parent;
3408var foreachNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("foreach", StringComparison.Ordinal)).Parent;
3429var delegateNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("delegate", StringComparison.Ordinal)).Parent;
3448var usingNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("using", StringComparison.Ordinal)).Parent;
3477var foreachNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("aaa", StringComparison.Ordinal)).Parent;
3501var foreachNode = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("aaa", StringComparison.Ordinal)).Parent;
3528var foreachNode1 = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("aaa", StringComparison.Ordinal)).Parent;
3534var foreachNode2 = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("bbb", StringComparison.Ordinal)).Parent;
3565var catchDeclaration = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("aaa", StringComparison.Ordinal)).Parent;
3586var methodDecl = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("Goo", StringComparison.Ordinal)).Parent;
3611var methodDecl = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("Goo", StringComparison.Ordinal)).Parent;
3668dynamic methodDecl = (MethodDeclarationSyntax)tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf("Main", StringComparison.Ordinal)).Parent;
3686var globalStmt = tree.GetCompilationUnitRoot().FindToken(tree.GetCompilationUnitRoot().ToFullString().IndexOf('/')).Parent.AncestorsAndSelf().Single(x => x.IsKind(SyntaxKind.GlobalStatement));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (621)
LexicalAndXml\PreprocessorTests.cs (11)
107var fullText = node.ToFullString();
2104Assert.Equal($"#region A//B{Environment.NewLine}", regionDirective.ToFullString());
2126Assert.Equal($"#region A/\\B{Environment.NewLine}", regionDirective.ToFullString());
2214Assert.Equal($"#region \"{Environment.NewLine}", regionDirective.ToFullString());
2235Assert.Equal($"#region \" {Environment.NewLine}", regionDirective.ToFullString());
2256Assert.Equal($"#region \"goo\"{Environment.NewLine}", regionDirective.ToFullString());
2277Assert.Equal($"#region \"goo\" {Environment.NewLine}", regionDirective.ToFullString());
2298Assert.Equal($"#region \"\"{Environment.NewLine}", regionDirective.ToFullString());
2319Assert.Equal($"#region \"\" {Environment.NewLine}", regionDirective.ToFullString());
2340Assert.Equal($"#region \"\"\"{Environment.NewLine}", regionDirective.ToFullString());
2361Assert.Equal($"#region \"\"\" {Environment.NewLine}", regionDirective.ToFullString());
LexicalAndXml\XmlDocCommentTests.cs (121)
78Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
98Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
115Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
130Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
146Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
168Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
192Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
215Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
238Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
261Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
288Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
316Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
328Assert.Equal($"<goo {Environment.NewLine}/// />", doc.Content[1].ToFullString());
340Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
352Assert.Equal($"<goo {Environment.NewLine}/// />", doc.Content[1].ToFullString());
365Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
377Assert.Equal($"<goo {Environment.NewLine} * />", doc.Content[1].ToFullString());
391Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
403Assert.Equal($"<goo {Environment.NewLine} * />", doc.Content[1].ToFullString());
418Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
445Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
473Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
502Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
532Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
561Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
591Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
622Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
645Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
667Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
689Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
711Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
733Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
753Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
787Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
820Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
851Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
879Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
904Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
930Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
955Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
982Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1013Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1041Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1066Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1091Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1118Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1151Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1182Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1208Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1235Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1263Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1288Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1308Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1332Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1357Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1381Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1406Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1430Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1455Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1479Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1504Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1515Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1526Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1537Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1548Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1559Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1587Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1615Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1641Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1672Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1689Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1708Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1747Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1787Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1828Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1863Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1898Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1933Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1968Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2005Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2043Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2079Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2110Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2143Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2173Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2204Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2239Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2254Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2282Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2324Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2356Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2380Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2410Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2439Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2462Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2489Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2514Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2539Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2565Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2591Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2606Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2620Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2635Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2653Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2676Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2694Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2720Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2743Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2767Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
2961var actual = documentationComment.ToFullString();
2981var actual = documentationComment.ToFullString();
3007var actual = documentationComment.ToFullString();
3022docComment.ToFullString());
3051var actual = documentationComment.ToFullString();
3077var actual = documentationComment.ToFullString();
3104var actual = documentationComment.ToFullString();
3133var actual = documentationComment.ToFullString();
3158var actual = documentationComment.ToFullString();
3183var actual = documentationComment.ToFullString();
3360sb.Append(element.ToFullString());
3368sb.Append(element.ToFullString());
Parsing\ParsingErrorRecoveryTests.cs (331)
241Assert.Equal(text, file.ToFullString());
256Assert.Equal(text, file.ToFullString());
272Assert.Equal(text, file.ToFullString());
288Assert.Equal(text, file.ToFullString());
304Assert.Equal(text, file.ToFullString());
320Assert.Equal(text, file.ToFullString());
335Assert.Equal(text, file.ToFullString());
350Assert.Equal(text, file.ToFullString());
365Assert.Equal(text, file.ToFullString());
381Assert.Equal(text, file.ToFullString());
397Assert.Equal(text, file.ToFullString());
412Assert.Equal(text, file.ToFullString());
428Assert.Equal(text, file.ToFullString());
449Assert.Equal(text, file.ToFullString());
465Assert.Equal(text, file.ToFullString());
481Assert.Equal(text, file.ToFullString());
497Assert.Equal(text, file.ToFullString());
513Assert.Equal(text, file.ToFullString());
527Assert.Equal(text, file.ToFullString());
541Assert.Equal(text, file.ToFullString());
555Assert.Equal(text, file.ToFullString());
570Assert.Equal(text, file.ToFullString());
598Assert.Equal(text, file.ToFullString());
608Assert.Equal(text, file.ToFullString());
624Assert.Equal(text, file.ToFullString());
639Assert.Equal(text, file.ToFullString());
654Assert.Equal(text, file.ToFullString());
668Assert.Equal(text, file.ToFullString());
683Assert.Equal(text, file.ToFullString());
698Assert.Equal(text, file.ToFullString());
714Assert.Equal(text, file.ToFullString());
731Assert.Equal(text, file.ToFullString());
749Assert.Equal(text, file.ToFullString());
765Assert.Equal(text, file.ToFullString());
779Assert.Equal(text, file.ToFullString());
793Assert.Equal(text, file.ToFullString());
807Assert.Equal(text, file.ToFullString());
821Assert.Equal(text, file.ToFullString());
835Assert.Equal(text, file.ToFullString());
845Assert.Equal(text, file.ToFullString());
858Assert.Equal(text, file.ToFullString());
875Assert.Equal(text, file.ToFullString());
891Assert.Equal(text, file.ToFullString());
908Assert.Equal(text, file.ToFullString());
925Assert.Equal(text, file.ToFullString());
940Assert.Equal(text, file.ToFullString());
954Assert.Equal(text, file.ToFullString());
969Assert.Equal(text, file.ToFullString());
984Assert.Equal(text, file.ToFullString());
998Assert.Equal(text, file.ToFullString());
1011Assert.Equal(text, file.ToFullString());
1025Assert.Equal(text, file.ToFullString());
1038Assert.Equal(text, file.ToFullString());
1052Assert.Equal(text, file.ToFullString());
1066Assert.Equal(text, file.ToFullString());
1079Assert.Equal(text, file.ToFullString());
1093Assert.Equal(text, file.ToFullString());
1106Assert.Equal(text, file.ToFullString());
1120Assert.Equal(text, file.ToFullString());
1136Assert.Equal(text, file.ToFullString());
1151Assert.Equal(text, file.ToFullString());
1165Assert.Equal(text, file.ToFullString());
1179Assert.Equal(text, file.ToFullString());
1195Assert.Equal(text, file.ToFullString());
1210Assert.Equal(text, file.ToFullString());
1224Assert.Equal(text, file.ToFullString());
1238Assert.Equal(text, file.ToFullString());
1255Assert.Equal(text, file.ToFullString());
1271Assert.Equal(text, file.ToFullString());
1286Assert.Equal(text, file.ToFullString());
1300Assert.Equal(text, file.ToFullString());
1315Assert.Equal(text, file.ToFullString());
1330Assert.Equal(text, file.ToFullString());
1344Assert.Equal(text, file.ToFullString());
1359Assert.Equal(text, file.ToFullString());
1374Assert.Equal(text, file.ToFullString());
1388Assert.Equal(text, file.ToFullString());
1406Assert.Equal(text, file.ToFullString());
1423Assert.Equal(text, file.ToFullString());
1441Assert.Equal(text, file.ToFullString());
1456Assert.Equal(text, file.ToFullString());
1470Assert.Equal(text, file.ToFullString());
1485Assert.Equal(text, file.ToFullString());
1500Assert.Equal(text, file.ToFullString());
1514Assert.Equal(text, file.ToFullString());
1529Assert.Equal(text, file.ToFullString());
1547Assert.Equal(text, file.ToFullString());
1565Assert.Equal(text, file.ToFullString());
1584Assert.Equal(text, file.ToFullString());
1604Assert.Equal(text, file.ToFullString());
1623Assert.Equal(text, file.ToFullString());
1643Assert.Equal(text, file.ToFullString());
1660Assert.Equal(text, file.ToFullString());
1677Assert.Equal(text, file.ToFullString());
1695Assert.Equal(text, file.ToFullString());
1713Assert.Equal(text, file.ToFullString());
1732Assert.Equal(text, file.ToFullString());
1750Assert.Equal(text, file.ToFullString());
1770Assert.Equal(text, file.ToFullString());
1787Assert.Equal(text, file.ToFullString());
1804Assert.Equal(text, file.ToFullString());
1822Assert.Equal(text, file.ToFullString());
1839Assert.Equal(text, file.ToFullString());
1858Assert.Equal(text, file.ToFullString());
1877Assert.Equal(text, file.ToFullString());
1897Assert.Equal(text, file.ToFullString());
1916Assert.Equal(text, file.ToFullString());
1937Assert.Equal(text, file.ToFullString());
1955Assert.Equal(text, file.ToFullString());
1972Assert.Equal(text, file.ToFullString());
1989Assert.Equal(text, file.ToFullString());
2006Assert.Equal(text, file.ToFullString());
2021Assert.Equal(text, file.ToFullString());
2060Assert.Equal(text, file.ToFullString());
2080Assert.Equal(text, file.ToFullString());
2099Assert.Equal(text, file.ToFullString());
2120Assert.Equal(text, file.ToFullString());
2138Assert.Equal(text, file.ToFullString());
2169Assert.Equal(text, file.ToFullString());
2187Assert.Equal(text, file.ToFullString());
2204Assert.Equal(text, file.ToFullString());
2223Assert.Equal(text, file.ToFullString());
2263Assert.Equal(text, file.ToFullString());
2284Assert.Equal(text, file.ToFullString());
2304Assert.Equal(text, file.ToFullString());
2326Assert.Equal(text, file.ToFullString());
2345Assert.Equal(text, file.ToFullString());
2363Assert.Equal(text, file.ToFullString());
2380Assert.Equal(text, file.ToFullString());
2396Assert.Equal(text, file.ToFullString());
2411Assert.Equal(text, file.ToFullString());
2427Assert.Equal(text, file.ToFullString());
2442Assert.Equal(text, file.ToFullString());
2456Assert.Equal(text, file.ToFullString());
2473Assert.Equal(text, file.ToFullString());
2492Assert.Equal(text, file.ToFullString());
2510Assert.Equal(text, file.ToFullString());
2527Assert.Equal(text, file.ToFullString());
2543Assert.Equal(text, file.ToFullString());
2560Assert.Equal(text, file.ToFullString());
2576Assert.Equal(text, file.ToFullString());
2591Assert.Equal(text, file.ToFullString());
2609Assert.Equal(text, file.ToFullString());
2623Assert.Equal(text, file.ToFullString());
2638Assert.Equal(text, file.ToFullString());
2652Assert.Equal(text, file.ToFullString());
2668Assert.Equal(text, file.ToFullString());
2682Assert.Equal(text, file.ToFullString());
2696Assert.Equal(text, file.ToFullString());
2710Assert.Equal(text, file.ToFullString());
2724Assert.Equal(text, file.ToFullString());
2738Assert.Equal(text, file.ToFullString());
2752Assert.Equal(text, file.ToFullString());
2767Assert.Equal(text, file.ToFullString());
2782Assert.Equal(text, file.ToFullString());
2796Assert.Equal(text, file.ToFullString());
2810Assert.Equal(text, file.ToFullString());
2824Assert.Equal(text, file.ToFullString());
2839Assert.Equal(text, file.ToFullString());
2854Assert.Equal(text, file.ToFullString());
2869Assert.Equal(text, file.ToFullString());
2886Assert.Equal(text, file.ToFullString());
2902Assert.Equal(text, file.ToFullString());
2920Assert.Equal(text, file.ToFullString());
2936Assert.Equal(text, file.ToFullString());
2952Assert.Equal(text, file.ToFullString());
2968Assert.Equal(text, file.ToFullString());
2984Assert.Equal(text, file.ToFullString());
3000Assert.Equal(text, file.ToFullString());
3018Assert.Equal(text, file.ToFullString());
3036Assert.Equal(text, file.ToFullString());
3059Assert.Equal(text, file.ToFullString());
3083Assert.Equal(text, file.ToFullString());
3107Assert.Equal(text, file.ToFullString());
3129Assert.Equal(text, file.ToFullString());
3152Assert.Equal(text, file.ToFullString());
3175Assert.Equal(text, file.ToFullString());
3198Assert.Equal(text, file.ToFullString());
3221Assert.Equal(text, file.ToFullString());
3244Assert.Equal(text, file.ToFullString());
3265Assert.Equal(text, file.ToFullString());
3286Assert.Equal(text, file.ToFullString());
3307Assert.Equal(text, file.ToFullString());
3328Assert.Equal(text, file.ToFullString());
3349Assert.Equal(text, file.ToFullString());
3370Assert.Equal(text, file.ToFullString());
3392Assert.Equal(text, file.ToFullString());
3415Assert.Equal(text, file.ToFullString());
3438Assert.Equal(text, file.ToFullString());
3461Assert.Equal(text, file.ToFullString());
3485Assert.Equal(text, file.ToFullString());
3508Assert.Equal(text, file.ToFullString());
3531Assert.Equal(text, file.ToFullString());
3574Assert.Equal(text, file.ToFullString());
3599Assert.Equal(text, file.ToFullString());
3624Assert.Equal(text, file.ToFullString());
3650Assert.Equal(text, file.ToFullString());
3674Assert.Equal(text, file.ToFullString());
3698Assert.Equal(text, file.ToFullString());
3723Assert.Equal(text, file.ToFullString());
3747Assert.Equal(text, file.ToFullString());
3771Assert.Equal(text, file.ToFullString());
3795Assert.Equal(text, file.ToFullString());
3820Assert.Equal(text, file.ToFullString());
3844Assert.Equal(text, file.ToFullString());
3868Assert.Equal(text, file.ToFullString());
3893Assert.Equal(text, file.ToFullString());
3919Assert.Equal(text, file.ToFullString());
3945Assert.Equal(text, file.ToFullString());
3972Assert.Equal(text, file.ToFullString());
3997Assert.Equal(text, file.ToFullString());
4022Assert.Equal(text, file.ToFullString());
4048Assert.Equal(text, file.ToFullString());
4069Assert.Equal(text, file.ToFullString());
4114Assert.Equal(text, file.ToFullString());
4135Assert.Equal(text, file.ToFullString());
4156Assert.Equal(text, file.ToFullString());
4177Assert.Equal(text, file.ToFullString());
4199Assert.Equal(text, file.ToFullString());
4221Assert.Equal(text, file.ToFullString());
4244Assert.Equal(text, file.ToFullString());
4267Assert.Equal(text, file.ToFullString());
4288Assert.Equal(text, file.ToFullString());
4311Assert.Equal(text, file.ToFullString());
4334Assert.Equal(text, file.ToFullString());
4360Assert.Equal(text, file.ToFullString());
4382Assert.Equal(text, file.ToFullString());
4408Assert.Equal(text, file.ToFullString());
4435Assert.Equal(text, file.ToFullString());
4456Assert.Equal(text, file.ToFullString());
4479Assert.Equal(text, file.ToFullString());
4504Assert.Equal(text, file.ToFullString());
4529Assert.Equal(text, file.ToFullString());
4551Assert.Equal(text, file.ToFullString());
4576Assert.Equal(text, file.ToFullString());
4602Assert.Equal(text, file.ToFullString());
4629Assert.Equal(text, file.ToFullString());
4656Assert.Equal(text, file.ToFullString());
4684Assert.Equal(text, file.ToFullString());
4711Assert.Equal(text, file.ToFullString());
4738Assert.Equal(text, file.ToFullString());
4767Assert.Equal(text, file.ToFullString());
4796Assert.Equal(text, file.ToFullString());
4826Assert.Equal(text, file.ToFullString());
4855Assert.Equal(text, file.ToFullString());
4884Assert.Equal(text, file.ToFullString());
4911Assert.Equal(text, file.ToFullString());
4938Assert.Equal(text, file.ToFullString());
4965Assert.Equal(text, file.ToFullString());
4993Assert.Equal(text, file.ToFullString());
5020Assert.Equal(text, file.ToFullString());
5048Assert.Equal(text, file.ToFullString());
5074Assert.Equal(text, file.ToFullString());
5104Assert.Equal(text, file.ToFullString());
5133Assert.Equal(text, file.ToFullString());
5163Assert.Equal(text, file.ToFullString());
5816Assert.Equal(text, file.ToFullString());
5855Assert.Equal(text, file.ToFullString());
5884Assert.Equal(text, file.ToFullString());
5913Assert.Equal(text, file.ToFullString());
5943Assert.Equal(text, file.ToFullString());
5972Assert.Equal(text, file.ToFullString());
6006Assert.Equal(text, file.ToFullString());
6033Assert.Equal(text, file.ToFullString());
6060Assert.Equal(text, file.ToFullString());
6087Assert.Equal(text, file.ToFullString());
6115Assert.Equal(text, file.ToFullString());
6142Assert.Equal(text, file.ToFullString());
6172Assert.Equal(text, file.ToFullString());
6203Assert.Equal(text, file.ToFullString());
6231Assert.Equal(text, file.ToFullString());
6278Assert.Equal(text, file.ToFullString());
6312Assert.Equal(text, file.ToFullString());
6342Assert.Equal(text, file.ToFullString());
6355Assert.Equal("var x = (y, ", ds.ToFullString());
6400Assert.Equal(text, file.ToFullString());
6424Assert.Equal(text, file.ToFullString());
6449Assert.Equal(text, file.ToFullString());
6484Assert.Equal(text, file.ToFullString());
6523Assert.Equal(text, file.ToFullString());
6562Assert.Equal(text, file.ToFullString());
6594Assert.Equal(text, file.ToFullString());
6625Assert.Equal(text, file.ToFullString());
6670Assert.Equal(text, file.ToFullString());
6714Assert.Equal(text, file.ToFullString());
6763Assert.Equal(text, file.ToFullString());
6811Assert.Equal(text, file.ToFullString());
6858Assert.Equal(text, file.ToFullString());
6910Assert.Equal(text, file.ToFullString());
6962Assert.Equal(text, file.ToFullString());
6973Assert.Equal(text, file.ToFullString());
6992Assert.Equal(text, file.ToFullString());
7017Assert.Equal(text, file.ToFullString());
7033Assert.Equal(text, file.ToFullString());
7058Assert.Equal(text, file.ToFullString());
7068Assert.Equal(text, file.ToFullString());
7083Assert.Equal(text, file.ToFullString());
7098Assert.Equal(text, file.ToFullString());
7122Assert.Equal(text, file.ToFullString());
7150Assert.Equal(text, file.ToFullString());
7181Assert.Equal(text, file.ToFullString());
7197Assert.Equal(text, file.ToFullString());
7213Assert.Equal(text, file.ToFullString());
7234Assert.Equal(text, file.ToFullString());
7252Assert.Equal(text, file.ToFullString());
7272Assert.Equal(text, file.ToFullString());
7298Assert.Equal(text, file.ToFullString());
7331Assert.Equal(text, file.ToFullString());
7356Assert.Equal(text, file.ToFullString());
7376Assert.Equal(text, srcTree.ToFullString());
7396Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString());
7415Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString());
7449Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString());
7474Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString());
7499Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString());
7525Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString());
7549Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString());
7574Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString());
7588Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString());
7761var toString = tree.GetRoot().ToFullString();
7776var toString = tree.GetRoot().ToFullString();
7807var toString = tree.GetRoot().ToFullString();
7841var toString = tree.GetRoot().ToFullString();
7866var toString = tree.GetRoot().ToFullString();
7893var toString = tree.GetRoot().ToFullString();
7907var toString = tree.GetRoot().ToFullString();
7935Assert.Equal(source, root.ToFullString());
7956Assert.Equal(source, root.ToFullString());
7977Assert.Equal(source, root.ToFullString());
8000Assert.Equal(source, root.ToFullString());
8024Assert.Equal(source, root.ToFullString());
Syntax\SyntaxFactoryTests.cs (18)
38Assert.Equal("System.String", usingDirective.Name.ToFullString());
115Assert.Equal("#pragma checksum \"file\" \"guid\" \"bytes\"\r\n", t.NormalizeWhitespace().ToFullString());
502Assert.Equal("class C\r\n{\r\n int? P { }\r\n}", syntaxNode.ToFullString());
525Assert.Equal("class C\r\n{\r\n DateTime? P { }\r\n}", syntaxNode.ToFullString());
535Assert.Equal("x is int ? y : z", syntaxNode.ToFullString());
540Assert.Equal("x is DateTime ? y : z", syntaxNode2.ToFullString());
548Assert.Equal("x is int ?? y", syntaxNode.ToFullString());
551Assert.Equal("x is DateTime ?? y", syntaxNode2.ToFullString());
554Assert.Equal("x is object ?? y", syntaxNode3.ToFullString());
573Assert.Equal("int[]M(){};", syntaxNode.ToFullString());
581Assert.Equal("()=>{}", lambda.ToFullString());
584Assert.Equal(fullySpecified.ToFullString(), lambda.ToFullString());
592Assert.Equal("()=>1", lambda.ToFullString());
597Assert.Equal(fullySpecified.ToFullString(), lambda.ToFullString());
606Assert.Equal("record R;", record.NormalizeWhitespace().ToFullString());
618Assert.Equal("record R\r\n{\r\n private int i;\r\n}", record.NormalizeWhitespace().ToFullString());
Syntax\SyntaxNodeTests.cs (73)
1008Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1108Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1138Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
1757Assert.Equal(rootNode.FullSpan.Length, rootNode.ToFullString().Length);
1775Assert.Equal(rootNode.FullSpan.Length, rootNode.ToFullString().Length);
2082Assert.Equal("a + c", expr2.ToFullString());
2095var replacedText = replaced.ToFullString();
2108Assert.Equal("m(c,d, b)", newNode.ToFullString());
2112Assert.Equal("m(a, c,d)", newNode.ToFullString());
2116Assert.Equal("m(b)", newNode.ToFullString());
2120Assert.Equal("m(a)", newNode.ToFullString());
2148Assert.Equal("m(c,d,a, b)", newNode.ToFullString());
2152Assert.Equal("m(a,c,d, b)", newNode.ToFullString());
2156Assert.Equal("m(a,c,d, b)", newNode.ToFullString());
2160Assert.Equal("m(a, b,c,d)", newNode.ToFullString());
2188Assert.Equal("{ var z = 30; var q = 40; var y = 20; }", newBlock.ToFullString());
2192Assert.Equal("{ var x = 10; var z = 30; var q = 40; }", newBlock.ToFullString());
2196Assert.Equal("{ var y = 20; }", newBlock.ToFullString());
2200Assert.Equal("{ var x = 10; }", newBlock.ToFullString());
2212Assert.Equal("{ var z = 30; var q = 40; var x = 10; var y = 20; }", newBlock.ToFullString());
2216Assert.Equal("{ var x = 10; var z = 30; var q = 40; var y = 20; }", newBlock.ToFullString());
2220Assert.Equal("{ var x = 10; var z = 30; var q = 40; var y = 20; }", newBlock.ToFullString());
2224Assert.Equal("{ var x = 10; var y = 20; var z = 30; var q = 40; }", newBlock.ToFullString());
2243Assert.Equal("d + d + d ", replaced.ToFullString());
2255Assert.Equal("public class C { }", cu1.ToFullString());
2258Assert.Equal("public partial class C { }", cu2.ToFullString());
2261Assert.Equal("class C { }", cu3.ToFullString());
2289Assert.Equal("static public class C { }", cu1.ToFullString());
2292Assert.Equal("public static class C { }", cu2.ToFullString());
2320var text2 = expr2.ToFullString();
2335var text2 = expr2.ToFullString();
2348var text2 = cu2.ToFullString();
2365Assert.Equal("#if true\r\na + \r\n#endif\r\n + b", expr2.ToFullString());
2375Assert.Equal("a + b", expr2.ToFullString());
2385Assert.Equal("a + b", replaced.ToFullString());
2401Assert.Equal("/* a */ identifier", ex1.ToFullString());
2404Assert.Equal("/* a *//* b */ identifier", ex2.ToFullString());
2407Assert.Equal(" identifier", ex3.ToFullString());
2423Assert.Equal("/* a *//* b *//* c */ identifier", ex1.ToFullString());
2426Assert.Equal("/* c *//* a *//* b */ identifier", ex2.ToFullString());
2461var text = expr2.ToFullString();
2476var text = expr2.ToFullString();
2492var text = expr2.ToFullString();
2509var text = expr2.ToFullString();
2530var text = expr2.ToFullString();
2549var text = expr2.ToFullString();
2565var text = expr2.ToFullString();
2581var text = expr2.ToFullString();
2597var text = expr2.ToFullString();
2617var text = expr2.ToFullString();
2634var text = expr2.ToFullString();
2648var text = expr2.ToFullString();
2662var text = expr2.ToFullString();
2676var text = expr2.ToFullString();
2690var text = expr2.ToFullString();
2708var text = m2.ToFullString();
2741var text = cu2.ToFullString();
2776var text = cu2.ToFullString();
2816var text = cu2.ToFullString();
2848var text = cu2.ToFullString();
2865var text = cu2.ToFullString();
2881var text = cu2.ToFullString();
2940var text = cu2.ToFullString();
2981var text = cu2.ToFullString();
3025var text = cu2.ToFullString();
3067var text = cu2.ToFullString();
3109var text = cu2.ToFullString();
3149var text = cu2.ToFullString();
3192var text = cu2.ToFullString();
3233var text = cu2.ToFullString();
3257var text = cu2.ToFullString();
3501Assert.Equal(text, node.ToFullString());
3991Assert.Equal("string s!!", newParameter.ToFullString());
Syntax\SyntaxRewriterTests.cs (12)
384Assert.Equal("m(c,d, b)", newRoot.ToFullString());
405Assert.Equal("m(c,d,a, b)", newNode.ToFullString());
412Assert.Equal("m(a,c,d, b)", newNode2.ToFullString());
431Assert.Equal("public partial class C { }", newRoot.ToFullString());
449Assert.Equal("static public class C { }", newRoot.ToFullString());
455Assert.Equal("public static class C { }", newRoot2.ToFullString());
476Assert.Equal("/* a *//* b */ identifier", newRoot.ToFullString());
482Assert.Equal(" identifier", newRoot2.ToFullString());
503Assert.Equal("/* c *//* a *//* b */ identifier", newRoot.ToFullString());
654Assert.Equal(expectedNewSource, newRoot.ToFullString());
673Assert.Equal(expectedText, newRoot.ToFullString());
715Assert.Equal(output, result.ToFullString());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (14)
Formatting\FormattingElasticTriviaTests.cs (5)
90Assert.Equal(expected, newCompilation.ToFullString());
129var formatted = Formatter.Format(newRoot, workspace.Services.SolutionServices, options, CancellationToken.None).ToFullString();
132var elasticOnlyFormatted = Formatter.Format(newRoot, SyntaxAnnotation.ElasticAnnotation, workspace.Services.SolutionServices, options, CancellationToken.None).ToFullString();
135var annotationFormatted = Formatter.Format(newRoot, Formatter.Annotation, workspace.Services.SolutionServices, options, CancellationToken.None).ToFullString();
186Assert.Equal(expected, newCompilation.ToFullString());
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.Features (8)
Microsoft.CodeAnalysis.Test.Utilities (2)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (117)
TestSyntaxNodes.vb (65)
585Assert.Equal("( ) ", arglist.ToFullString)
593Assert.Equal("goo ", seplist(0).ToFullString)
611Assert.Equal("Inherits goo ", statement.ToFullString)
646Assert.Equal("Inherits aaa , bbb ; cc ", statement.ToFullString)
900methodStatement.ToFullString)
1011Assert.Equal("End Module ", endModule.ToFullString)
1045methodDecl.ToFullString)
1257Assert.Equal("""Hi""- ", simpleTree.ToFullString)
1261Assert.Equal("""Hi""- ""Bye""", simpleTree.ToFullString)
1265Assert.Equal("""Hi""""Bye""", simpleTree.ToFullString)
1269Assert.Equal("""Hi""= ""Bye""", simpleTree.ToFullString)
1277Assert.Equal("a + c", expr2.ToFullString())
1289Dim replacedText = replaced.ToFullString()
1301Assert.Equal("m(c,d, b)", newNode.ToFullString())
1305Assert.Equal("m(a, c,d)", newNode.ToFullString())
1309Assert.Equal("m(b)", newNode.ToFullString())
1313Assert.Equal("m(a)", newNode.ToFullString())
1338Assert.Equal("m(c,d,a, b)", newNode.ToFullString())
1342Assert.Equal("m(a,c,d, b)", newNode.ToFullString())
1346Assert.Equal("m(a,c,d, b)", newNode.ToFullString())
1350Assert.Equal("m(a, b,c,d)", newNode.ToFullString())
1389End If</x>.Value, newBlock.ToFullString())
1398End If</x>.Value, newBlock.ToFullString())
1405End If</x>.Value, newBlock.ToFullString())
1412End If</x>.Value, newBlock.ToFullString())
1438End If</x>.Value, newBlock.ToFullString())
1448End If</x>.Value, newBlock.ToFullString())
1458End If</x>.Value, newBlock.ToFullString())
1468End If</x>.Value, newBlock.ToFullString())
1486Assert.Equal("d + d + d ", replaced.ToFullString())
1502End Class</x>.Value, cu1.ToFullString())
1507End Class</x>.Value, cu2.ToFullString())
1512End Class</x>.Value, cu3.ToFullString())
1545End Class</x>.Value, cu1.ToFullString())
1550End Class</x>.Value, cu2.ToFullString())
1577Assert.Equal("a + b", expr2.ToFullString())
1586Assert.Equal("a + b", replaced.ToFullString())
1601Assert.Equal("identifier 'a", ex1.ToFullString())
1604Assert.Equal("identifier 'a'b", ex2.ToFullString())
1607Assert.Equal("identifier ", ex3.ToFullString())
1622Assert.Equal("identifier 'a'b'c", ex1.ToFullString())
1625Assert.Equal("identifier 'c'a'b", ex2.ToFullString())
1699Assert.Equal("1- X( 3, 4+ 8, 9) ", simpleTree.ToFullString())
1787Assert.Equal(" <goo> </ > ", xmlElement.ToFullString)
1791Assert.Equal(" <goo> </ > ", docComment.ToFullString)
1793Assert.Equal(" <goo> </ > ", docComment.Content(0).ToFullString)
1795Assert.Equal(" <goo> ", DirectCast(docComment.Content(0), XmlElementSyntax).StartTag.ToFullString)
1900Assert.Equal(tree.ToFullString, txt)
1912Assert.Equal(tree.ToFullString, txt)
2541Dim text = expr2.ToFullString()
2555Dim text = expr2.ToFullString()
2569Dim text = expr2.ToFullString()
2583Dim text = expr2.ToFullString()
2596Dim text = expr2.ToFullString()
2609Dim text = expr2.ToFullString()
2622Dim text = expr2.ToFullString()
2645Dim result = cu2.ToFullString()
2670Dim result = cu2.ToFullString()
2695Dim result = cu2.ToFullString()
2726Dim result = cu2.ToFullString()
2765Dim result = cu2.ToFullString()
2807Dim result = cu2.ToFullString()
3294Assert.True(Root.ToFullString.Contains("Inherits aaa"))
3295Assert.True(Root.ToFullString.Contains("Implements Ifoo"))
3300<%= Root.ToFullString %>
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (4)
Microsoft.CodeAnalysis.Workspaces (3)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Microsoft.DotNet.GenFacades (5)
Microsoft.Interop.ComInterfaceGenerator (1)
Microsoft.Interop.JavaScript.JSImportGenerator (2)
Microsoft.Interop.SourceGeneration (2)
Microsoft.ML.CodeGenerator (1)