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)); 1543UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 1614UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 1856UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 1971UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2091UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2148UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2172UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2198UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2304UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2410UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2502UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2620UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2728UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 2848UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 3300UsingTree(source, parseOptions); 3338UsingTree(source, TestOptions.Script); 3488UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 3555UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 3778UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4017UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4157UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4305UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4455UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4526UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4601UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4677UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4752UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4823UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4894UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 4969UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5045UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5112UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5552UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5631UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5702UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5902UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 5954UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6156UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6386UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6513UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6645UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6797UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6853UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6913UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 6974UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7034UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7090UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7146UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7206UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7267UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7319UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7941UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 7997UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 8050UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 8157UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 8321UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11358UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11478UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11610UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11685UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11740UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11799UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 11985UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12082UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12126UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12172UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12214UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12386UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12566UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12664UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12770UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12878UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12924UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 12974UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13025UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13075UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13121UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13175UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13221UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13271UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13322UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13364UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 13539UsingTree(source, TestOptions.Regular.WithLanguageVersion(langVersion)); 14227UsingTree(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)
34var tree = UsingTree(text, options, expectedParsingDiagnostics);
Parsing\FunctionPointerTests.cs (1)
1705UsingTree(@"
Parsing\LambdaReturnTypeParsingTests.cs (2)
5009UsingTree(source, TestOptions.Regular9); 5012UsingTree(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);