242 references to UsingTree
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (242)
Parsing\AllowsConstraintParsing.cs (1)
19=> UsingTree(text, options: null, expectedErrors);
Parsing\AsyncStreamsParsingTests.cs (3)
35UsingTree(@" 276UsingTree(@" 469UsingTree(@"
Parsing\DeclarationParsingTests.cs (1)
6544var tree = UsingTree(@"
Parsing\DeclarationScopeParsingTests.cs (86)
314UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 431UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 1555UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 1626UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 1868UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 1983UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2103UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2160UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2184UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2210UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2316UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2422UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2514UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2632UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2740UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2860UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 3312UsingTree(source, parseOptions); 3350UsingTree(source, TestOptions.Script); 3500UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 3567UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 3790UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4029UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4169UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4317UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4467UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4538UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4613UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4689UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4764UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4835UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4906UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4981UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5057UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5124UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5564UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5643UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5714UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5914UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5966UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6168UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6398UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6525UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6657UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6809UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6865UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6925UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6986UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7046UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7102UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7158UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7218UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7279UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7331UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7953UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 8009UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 8062UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 8169UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 8333UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11370UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11490UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11622UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11697UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11752UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11811UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11997UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12094UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12138UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12184UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12226UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12398UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12578UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12676UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12782UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12890UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12936UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12986UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13037UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13087UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13133UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13187UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13233UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13283UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13334UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13376UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13551UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 14239UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion));
Parsing\DeconstructionTests.cs (19)
41var tree = UsingTree(@" 115var tree = UsingTree(@" 193var tree = UsingTree(@" 269var tree = UsingTree(@" 357var tree = UsingTree(@" 441var tree = UsingTree(@" 516var tree = UsingTree(@" 592var tree = UsingTree(@" 684var tree = UsingTree(@" 774var tree = UsingTree(@" 887var tree = UsingTree(@" 964var tree = UsingTree(@" 1051var tree = UsingTree(@" 1125var tree = UsingTree(@" 1224var tree = UsingTree(@" 1322var tree = UsingTree(@" 1500var tree = UsingTree(@" 1580var tree = UsingTree(@" (int x, int y) = (1, 2); ", options: TestOptions.Script); 1656var tree = UsingTree(@" foreach ((int x, int y) in new[] { (1, 2) }) { }; ", options: TestOptions.Script);
Parsing\FieldKeywordParsingTests.cs (38)
57UsingTree($$""" 117UsingTree($$""" 159UsingTree($$""" 210UsingTree($$""" 267UsingTree($$""" 329UsingTree($$""" 386UsingTree($$""" 452UsingTree($$""" 524UsingTree($$""" 603UsingTree($$""" 671UsingTree($$""" 751UsingTree($$""" 847UsingTree($$""" 897UsingTree($$""" 954UsingTree($$""" 1000UsingTree($$""" 1046UsingTree($$""" 1092UsingTree($$""" 1142UsingTree($$""" 1196UsingTree($$""" 1243UsingTree($$""" 1312UsingTree($$""" 1363UsingTree($$""" 1417UsingTree($$""" 1478UsingTree($$""" 1556UsingTree($$""" 1620UsingTree($$""" 1696UsingTree($$""" 1747UsingTree($$""" 1837UsingTree($$""" 1914UsingTree($$""" 1965UsingTree($$""" 2024UsingTree($$""" 2083UsingTree($$""" 2147UsingTree($$""" 2220UsingTree($$$"""" 2271UsingTree($$$"""" 2328UsingTree($$"""
Parsing\FileModifierParsingTests.cs (1)
35var tree = UsingTree(text, options, expectedParsingDiagnostics);
Parsing\FunctionPointerTests.cs (1)
1705UsingTree(@"
Parsing\LambdaReturnTypeParsingTests.cs (2)
4988UsingTree(source, TestOptions.Regular9); 4991UsingTree(source, TestOptions.Regular10);
Parsing\LocalFunctionParsingTests.cs (7)
356var tree = UsingTree(@" 720UsingTree(code, TestOptions.Regular9).GetDiagnostics().Verify(); 723UsingTree(code, TestOptions.Regular8); 806UsingTree(code, TestOptions.Regular9).GetDiagnostics().Verify(); 809UsingTree(code, TestOptions.Regular8); 909var tree = UsingTree(@" 989var tree = UsingTree(@"
Parsing\MemberDeclarationParsingTests.cs (10)
2258UsingTree(""" 3232UsingTree(text, options: options.WithLanguageVersion(version)); 3924UsingTree("public int I.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 3979UsingTree("public int I<T>.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 5111UsingTree(text, options: options.WithLanguageVersion(version)); 5772UsingTree("int I.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 5826UsingTree("int I<T>.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 7021UsingTree(text, options: options.WithLanguageVersion(version)); 7625UsingTree("implicit I.operator int(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview)); 7679UsingTree("explicit I<T>.operator int(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview));
Parsing\ParsingTests.cs (1)
147return UsingTree(text, options: null, expectedErrors);
Parsing\PatternParsingTests.cs (1)
172UsingTree(@"
Parsing\RecordParsing.cs (24)
19=> UsingTree(text, TestOptions.Regular9, expectedErrors); 108UsingTree(text, options: TestOptions.Regular8); 2728UsingTree(text, options: TestOptions.Regular10); 2732UsingTree(text, options: TestOptions.Regular9); 2863UsingTree(text, options: TestOptions.Regular10); 2914UsingTree(text, options: TestOptions.Regular10); 2927UsingTree(text, options: TestOptions.Regular9); 3298UsingTree(text, options: TestOptions.Regular8); 3318UsingTree(text, options: TestOptions.Regular9); 3338UsingTree(text, options: TestOptions.Regular10); 3540UsingTree(text, options: TestOptions.RegularPreview); 3561UsingTree(text, options: TestOptions.RegularPreview); 3582UsingTree(text, options: TestOptions.RegularPreview); 3602UsingTree(text, options: TestOptions.RegularPreview); 3636UsingTree(text, options: TestOptions.RegularPreview); 3671UsingTree(text, options: TestOptions.RegularPreview); 3692UsingTree(text, options: TestOptions.RegularPreview); 3797UsingTree(text, options: TestOptions.RegularPreview); 3844UsingTree(text, options: TestOptions.Regular9); 3869UsingTree(text, options: TestOptions.RegularPreview); 3873UsingTree(text, options: TestOptions.Regular8); 3917UsingTree(text, options: TestOptions.Regular9); 4053UsingTree(text, options: TestOptions.RegularPreview); 4096UsingTree(text, options: TestOptions.RegularPreview);
Parsing\ScriptParsingTests.cs (10)
2612var tree = UsingTree(@"a * b;", TestOptions.Script); 2642var tree = UsingTree(@"a * b", TestOptions.Script); 2675var tree = UsingTree(@"a<t>.n * f(x)", TestOptions.Script); 2811var tree = UsingTree(@"T ? a;", TestOptions.Script); 2841var tree = UsingTree(@"T ? b, c = 1;", TestOptions.Script); 2884var tree = UsingTree(@"T ? b = d => { };", TestOptions.Script); 2931var tree = UsingTree(@"T ? b = x ? y : z;", TestOptions.Script); 6172var tree = UsingTree(@"T ? u => { } : v => { }", TestOptions.Script); 6225var tree = UsingTree(@"T ? u => (d ? e => 1 : f => 2)(3) : c => 2", TestOptions.Script); 8360var tree = UsingTree(@"from", TestOptions.Script);
Parsing\TopLevelStatementsParsingTests.cs (1)
1621var tree = UsingTree(test, TestOptions.RegularPreview.WithLanguageVersion(version));
Parsing\UsingDirectiveParsingTests.cs (7)
860UsingTree(text, options: TestOptions.Regular11); 4456UsingTree(text, options: TestOptions.Regular11); 4499UsingTree(text, options: TestOptions.Regular11); 4616UsingTree(text, options: TestOptions.Regular11); 4700UsingTree(text, options: TestOptions.Regular11); 4941UsingTree(text, options: TestOptions.Regular11); 5019UsingTree(text, options: TestOptions.Regular11);
Parsing\ValueTupleTests.cs (5)
28var tree = UsingTree(@" 112var tree = UsingTree(@" 226var tree = UsingTree(@" 330var tree = UsingTree(@" 436var tree = UsingTree(@"
Syntax\SyntaxTreeTests.cs (24)
340UsingTree(test, TestOptions.Regular10); 375UsingTree(test, TestOptions.Regular9); 399UsingTree(test, TestOptions.Regular10); 447UsingTree(test, TestOptions.Regular9); 481UsingTree(test, TestOptions.Regular10); 517UsingTree(test, TestOptions.Regular9); 542UsingTree(test, TestOptions.Regular10); 591UsingTree(test, TestOptions.Regular9); 626UsingTree(test, TestOptions.RegularPreview); 672UsingTree(test, TestOptions.Regular9); 704UsingTree(test, TestOptions.RegularPreview); 763UsingTree(test, TestOptions.Regular9); 808UsingTree(test, TestOptions.RegularPreview, 839UsingTree(test, TestOptions.RegularPreview, 873UsingTree(test, TestOptions.RegularPreview, 914UsingTree(test, TestOptions.RegularPreview); 948UsingTree(test, TestOptions.Regular, 975UsingTree(test, TestOptions.RegularPreview, 1003UsingTree(test, TestOptions.Regular, 1039UsingTree(test, TestOptions.RegularPreview, 1080UsingTree(test, TestOptions.RegularPreview, 1121UsingTree(test, TestOptions.RegularPreview); 1177UsingTree(test, TestOptions.RegularPreview); 1249UsingTree(test, TestOptions.RegularPreview);