394 references to UsingTree
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (394)
Parsing\AnonymousFunctionParsingTests.cs (23)
35UsingTree(test); 136UsingTree(test); 233UsingTree(test); 334UsingTree(test); 435UsingTree(test); 539UsingTree(test); 645UsingTree(test); 788UsingTree(test); 2454UsingTree(test); 2602UsingTree(test); 2750UsingTree(test); 2901UsingTree(test); 3012UsingTree(test); 3160UsingTree(test); 3275UsingTree(test); 3428UsingTree(test); 3581UsingTree(test); 3738UsingTree(test); 3858UsingTree(test); 4015UsingTree(test); 4139UsingTree(test); 4301UsingTree(test); 4463UsingTree(test);
Parsing\AsyncParsingTests.cs (17)
40UsingTree(@" 81UsingTree(@" 121UsingTree(@" 161UsingTree(@" 201UsingTree(@" 242UsingTree(@" 285UsingTree( 971UsingTree(@" 1016UsingTree(@" 1062UsingTree(@" 1154UsingTree(@" 1193UsingTree(@" 2394UsingTree(test); 2431UsingTree("class async { async async { get; } }").GetDiagnostics().Verify(); 2484UsingTree(text); 2534UsingTree("interface async { async this[async i] { get; } }").GetDiagnostics().Verify(); 2600UsingTree(test);
Parsing\AsyncStreamsParsingTests.cs (1)
113UsingTree(@"
Parsing\AwaitParsingTests.cs (4)
30UsingTree(@" 95UsingTree(@" 159UsingTree(@" 332UsingTree(@"
Parsing\CollectionExpressionParsingTests.cs (107)
50UsingTree("_ = [A, B].C();"); 113UsingTree("[A, B].C();"); 317UsingTree("[return: A, B] void F() { }"); 444UsingTree("[method: A, B] void F() { }"); 577UsingTree("[return: A] void F() { }"); 696UsingTree("_ = [A, B]?.C();"); 763UsingTree("[A, B]?.C();"); 822UsingTree("_ = [A, B]->C();"); 885UsingTree("[A, B]->C();"); 940UsingTree("[A] [B].C();"); 1002UsingTree( 1113UsingTree("_ = [A, B] is [A, B];"); 1184UsingTree("_ = [A, B] with { };"); 1240UsingTree("_ = [A, B] switch { _ => M() };"); 1313UsingTree( 1379UsingTree(""" 1474UsingTree("_ = [A, B] + [C, D];"); 1545UsingTree("_ = [];"); 1577UsingTree("_ = [[]];"); 5695UsingTree("var x = (A<B>)[1];"); 6205UsingTree("await [A];"); 6240UsingTree(@" 6305UsingTree(@" 7947UsingTree(""" 8092UsingTree(""" 8245UsingTree(""" 8849UsingTree(""" 8927UsingTree(""" 9005UsingTree(""" 9087UsingTree(""" 9169UsingTree(""" 9218UsingTree(""" 9267UsingTree(""" 9320UsingTree(""" 9373UsingTree(""" 9467UsingTree(""" 9532UsingTree(""" 9626UsingTree(""" 9691UsingTree(""" 9785UsingTree(""" 9850UsingTree(""" 9944UsingTree(""" 10009UsingTree(""" 10080UsingTree(""" 10122UsingTree(""" 10197UsingTree(""" 10243UsingTree(""" 10329UsingTree(""" 10386UsingTree(""" 10461UsingTree(""" 10507UsingTree(""" 10589UsingTree(""" 10805UsingTree(""" 10895UsingTree(""" 10956UsingTree(""" 11061UsingTree(""" 11137UsingTree(""" 11227UsingTree(""" 11489UsingTree(""" 11587UsingTree(""" 11656UsingTree(""" 11742UsingTree(""" 11799UsingTree(""" 11900UsingTree(""" 11972UsingTree(""" 12132UsingTree(""" 12191UsingTree(""" 12221UsingTree(""" 12280UsingTree(""" 12310UsingTree(""" 12381UsingTree(""" 12415UsingTree(""" 12482UsingTree(""" 12549UsingTree(""" 12632UsingTree(""" 12729UsingTree(""" 13980UsingTree(""" 14090UsingTree(""" 14172UsingTree(""" 14289UsingTree(""" 14378UsingTree(""" 14510UsingTree(""" 14614UsingTree(""" 14746UsingTree(""" 14850UsingTree(""" 14983UsingTree(""" 15088UsingTree(""" 15209UsingTree(""" 15302UsingTree(""" 15442UsingTree(""" 15554UsingTree(""" 15645UsingTree(""" 15708UsingTree(""" 15811UsingTree(""" 15886UsingTree(""" 15993UsingTree(""" 16072UsingTree(""" 16187UsingTree(""" 16274UsingTree(""" 16394UsingTree(""" 16486UsingTree(""" 16593UsingTree(""" 16672UsingTree(""" 16777UsingTree(""" 16854UsingTree("class C { public ReadOnlySpan<byte> B => [0, 1, 2, 3, 4, 5, 6, 7]; }"); 16964UsingTree("class C { public ReadOnlySpan<byte> B => [true: A] () => { }; }"); 17036UsingTree("class C { public bool[] B => [true]; }");
Parsing\DeclarationParsingTests.cs (23)
5996UsingTree(@" 6055UsingTree(@" 6395UsingTree(@" 9124UsingTree(text); 9145UsingTree(text); 9177UsingTree(text); 9217UsingTree(text); 9254UsingTree(text); 9379UsingTree(text); 9402UsingTree(text); 9508UsingTree(text); 9542UsingTree(text); 9584UsingTree(text); 9623UsingTree(text); 9678UsingTree(text); 9727UsingTree(text); 9750UsingTree(text); 9784UsingTree(text); 9811UsingTree(text); 10363UsingTree(text); 10603UsingTree(text); 10647UsingTree(text); 10744UsingTree(text);
Parsing\DeconstructionTests.cs (10)
1407var tree = UsingTree(@" 1755var tree = UsingTree(@" 2407var tree = UsingTree(@"void M() { var (x, _) = e; }"); 2472var tree = UsingTree(@"void M() { (var x, var _) = e; }"); 2550var tree = UsingTree(@"void M() { M(out var _); }"); 2613var tree = UsingTree(@"void M() { M(out int _); }"); 2676var tree = UsingTree(@"void M() { if (e is int _) {} }"); 2738var tree = UsingTree(@"void M() { if (e is var _) {} }"); 2797var tree = UsingTree(@"void M() { switch (e) { case int _: break; } }"); 2865var tree = UsingTree(@"void M() { switch (e) { case var _: break; } }");
Parsing\ExpressionParsingTests.cs (13)
1459UsingTree($""" 1643UsingTree($"new scoped();"); 1723UsingTree($"new partial[1];"); 1803UsingTree($"new partial();"); 3064UsingTree(@" 3835var tree = UsingTree(text); 3925var tree = UsingTree(text); 4016var tree = UsingTree(text); 4103var tree = UsingTree(text); 4197var tree = UsingTree(text); 4500var tree = UsingTree(text); 4591var tree = UsingTree(text); 4684var tree = UsingTree(text);
Parsing\LambdaAttributeParsingTests.cs (4)
3713UsingTree(""" 3911UsingTree(""" 4025UsingTree(""" 4137UsingTree("""
Parsing\LambdaReturnTypeParsingTests.cs (2)
2765UsingTree(source); 2826UsingTree(source);
Parsing\LocalFunctionParsingTests.cs (1)
628UsingTree(@"
Parsing\MemberDeclarationParsingTests.cs (3)
10167UsingTree(@" 12100UsingTree(text); 12162UsingTree(text);
Parsing\NameParsingTests.cs (4)
834UsingTree(source); 1037UsingTree(source); 1162UsingTree(source); 1291UsingTree(source);
Parsing\NullableParsingTests.cs (1)
1324UsingTree(
Parsing\ParserRegressionTests.cs (1)
263UsingTree(source);
Parsing\ScriptParsingTests.cs (41)
133UsingTree(@" 311UsingTree(@"new[] { 1 };"); 344UsingTree(@"new { a = 1 };"); 383UsingTree(@"new T[5];"); 421UsingTree(@"new int[] { }.Clone();"); 480UsingTree("new void Goo() { }"); 510var tree = UsingTree(@" 538UsingTree("new int[] Goo();"); 576var tree = UsingTree(@" 603var tree = UsingTree(@" 643var tree = UsingTree(@" 686var tree = UsingTree("new partial " + typeName + " Goo();"); 713var tree = UsingTree(@" 742var tree = UsingTree(@" 779UsingTree("new int Goo();"); 805var tree = UsingTree(@" 850var tree = UsingTree(@" 909var tree = UsingTree(@" 973var tree = UsingTree("new " + modifier + @" T Goo;"); 1001var tree = UsingTree(@" 1021var tree = UsingTree(@" 1052var tree = UsingTree(source); 1080var tree = UsingTree(source); 1106var tree = UsingTree(@" 1202var tree = UsingTree(@" 1227var tree = UsingTree(@" 1255var tree = UsingTree(@" 1286var tree = UsingTree(@" 1331var tree = UsingTree(@" 1413var tree = UsingTree(@" 1450var tree = UsingTree(@" 1492var tree = UsingTree(@" 1524var tree = UsingTree(@" 1563var tree = UsingTree(@" 1604var tree = UsingTree(@" 1651var tree = UsingTree(@" 1914var tree = UsingTree(@" 1989var tree = UsingTree(@" 2476var tree = UsingTree(@" 8042var tree = UsingTree(@" 8449var tree = UsingTree(@"from x;");
Parsing\StatementAttributeParsingTests.cs (72)
22var test = UsingTree(@" 88var test = UsingTree(@" 153var test = UsingTree(@" 240var test = UsingTree(@" 334var test = UsingTree(@" 419var test = UsingTree(@" 504var test = UsingTree(@" 570var test = UsingTree(@" 639var test = UsingTree(@" 713var test = UsingTree(@" 865var test = UsingTree(@" 940var test = UsingTree(@" 1018var test = UsingTree(@" 1092var test = UsingTree(@" 1194var test = UsingTree(@" 1328var test = UsingTree(@" 1404var test = UsingTree(@" 1490var test = UsingTree(@" 1574var test = UsingTree(@" 1693var test = UsingTree(@" 1763var test = UsingTree(@" 1833var test = UsingTree(@" 1903var test = UsingTree(@" 2085var test = UsingTree(@" 2161var test = UsingTree(@" 2237var test = UsingTree(@" 2313var test = UsingTree(@" 2646var test = UsingTree(@" 2725var test = UsingTree(@" 2913var test = UsingTree(@" 3101var test = UsingTree(@" 3180var test = UsingTree(@" 3422var test = UsingTree(@" 3504var test = UsingTree(@" 3586var test = UsingTree(@" 3676var test = UsingTree(@" 3757var test = UsingTree(@" 3831var test = UsingTree(@" 3924var test = UsingTree(@" 4007var test = UsingTree(@" 4092var test = UsingTree(@" 4177var test = UsingTree(@" 4259var test = UsingTree(@" 4336var test = UsingTree(@" 4424var test = UsingTree(@" 4513var test = UsingTree(@" 4610var test = UsingTree(@" 4688var test = UsingTree(@" 4763var test = UsingTree(@" 4858var test = UsingTree(@" 4957var test = UsingTree(@" 5034var test = UsingTree(@" 5106var test = UsingTree(@" 5194var test = UsingTree(@" 5272var test = UsingTree(@" 5358var test = UsingTree(@" 5435var test = UsingTree(@" 5611var test = UsingTree(@" 5729var test = UsingTree(@" 5835var test = UsingTree(@" 5934var test = UsingTree(@" 6030var test = UsingTree(@" 6122var test = UsingTree(@" 6200var test = UsingTree(@" 6292var test = UsingTree(@" 6370var test = UsingTree(@" 6449var test = UsingTree(@" 6536var test = UsingTree(@" 6780var tree = UsingTree(@" 7134var test = UsingTree(@" 7235var test = UsingTree(@" 7343var test = UsingTree(@"
Parsing\SuppressNullableWarningExpressionParsingTests.cs (1)
34var tree = UsingTree(source);
Parsing\SwitchExpressionParsingTests.cs (1)
1770UsingTree("""
Parsing\TopLevelStatementsParsingTests.cs (12)
466UsingTree(test); 1107UsingTree(test); 1826UsingTree(test); 2093UsingTree(test); 2117UsingTree(test); 2140UsingTree(test); 2171UsingTree(test); 2202UsingTree(test); 2673UsingTree(test); 2919UsingTree(test); 2961UsingTree(test); 3148UsingTree(test);
Parsing\TypeArgumentListParsingTests.cs (7)
689UsingTree(@" 1872UsingTree(@" 2270UsingTree(@" 2371UsingTree(@" 2480UsingTree(@" 2581UsingTree(@" 2699UsingTree(@"
Parsing\UsingDirectiveParsingTests.cs (46)
349UsingTree(text); 604UsingTree(text); 658UsingTree(text); 708UsingTree(text); 770UsingTree(text); 830UsingTree(text); 900UsingTree(text); 937UsingTree(text); 974UsingTree(text); 1018UsingTree(text); 1063UsingTree(text); 1107UsingTree(text); 1155UsingTree(text); 1230UsingTree(text); 1303UsingTree(text); 1378UsingTree(text); 1465UsingTree(text); 1544UsingTree(text); 1604UsingTree(text); 1707UsingTree(text); 1806UsingTree(text); 1847UsingTree(text); 1897UsingTree(text); 1944UsingTree(text); 2022UsingTree(text); 2095UsingTree(text); 2172UsingTree(text); 2247UsingTree(text); 2547UsingTree(text); 2585UsingTree(text); 2682UsingTree(text); 2827UsingTree(text); 2951UsingTree(text); 3055UsingTree(text); 3146UsingTree(text); 3210UsingTree(text); 3274UsingTree(text); 3347UsingTree(text); 3635UsingTree(text); 3785UsingTree(text); 4539UsingTree(text); 4579UsingTree(text); 4781UsingTree(text); 4862UsingTree(text); 5096UsingTree(text); 5176UsingTree(text);