242 references to UsingTree
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (242)
Parsing\AllowsConstraintParsing.cs (1)
19
=>
UsingTree
(text, options: null, expectedErrors);
Parsing\AsyncStreamsParsingTests.cs (3)
35
UsingTree
(@"
276
UsingTree
(@"
469
UsingTree
(@"
Parsing\DeclarationParsingTests.cs (1)
6544
var tree =
UsingTree
(@"
Parsing\DeclarationScopeParsingTests.cs (86)
314
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
431
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
1543
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
1614
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
1856
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
1971
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
2091
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
2148
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
2172
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
2198
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
2304
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
2410
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
2502
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
2620
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
2728
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
2848
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
3300
UsingTree
(source, parseOptions);
3338
UsingTree
(source, TestOptions.Script);
3488
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
3555
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
3778
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4017
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4157
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4305
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4455
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4526
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4601
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4677
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4752
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4823
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4894
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
4969
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
5045
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
5112
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
5552
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
5631
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
5702
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
5902
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
5954
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
6156
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
6386
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
6513
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
6645
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
6797
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
6853
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
6913
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
6974
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
7034
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
7090
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
7146
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
7206
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
7267
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
7319
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
7941
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
7997
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
8050
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
8157
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
8321
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
11358
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
11478
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
11610
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
11685
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
11740
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
11799
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
11985
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12082
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12126
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12172
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12214
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12386
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12566
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12664
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12770
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12878
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12924
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
12974
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
13025
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
13075
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
13121
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
13175
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
13221
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
13271
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
13322
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
13364
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
13539
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
14227
UsingTree
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
Parsing\DeconstructionTests.cs (19)
41
var tree =
UsingTree
(@"
115
var tree =
UsingTree
(@"
193
var tree =
UsingTree
(@"
269
var tree =
UsingTree
(@"
357
var tree =
UsingTree
(@"
441
var tree =
UsingTree
(@"
516
var tree =
UsingTree
(@"
592
var tree =
UsingTree
(@"
684
var tree =
UsingTree
(@"
774
var tree =
UsingTree
(@"
887
var tree =
UsingTree
(@"
964
var tree =
UsingTree
(@"
1051
var tree =
UsingTree
(@"
1125
var tree =
UsingTree
(@"
1224
var tree =
UsingTree
(@"
1322
var tree =
UsingTree
(@"
1500
var tree =
UsingTree
(@"
1580
var tree =
UsingTree
(@" (int x, int y) = (1, 2); ", options: TestOptions.Script);
1656
var tree =
UsingTree
(@" foreach ((int x, int y) in new[] { (1, 2) }) { }; ", options: TestOptions.Script);
Parsing\FieldKeywordParsingTests.cs (38)
57
UsingTree
($$"""
117
UsingTree
($$"""
159
UsingTree
($$"""
210
UsingTree
($$"""
267
UsingTree
($$"""
329
UsingTree
($$"""
386
UsingTree
($$"""
452
UsingTree
($$"""
524
UsingTree
($$"""
603
UsingTree
($$"""
671
UsingTree
($$"""
751
UsingTree
($$"""
847
UsingTree
($$"""
897
UsingTree
($$"""
954
UsingTree
($$"""
1000
UsingTree
($$"""
1046
UsingTree
($$"""
1092
UsingTree
($$"""
1142
UsingTree
($$"""
1196
UsingTree
($$"""
1243
UsingTree
($$"""
1312
UsingTree
($$"""
1363
UsingTree
($$"""
1417
UsingTree
($$"""
1478
UsingTree
($$"""
1556
UsingTree
($$"""
1620
UsingTree
($$"""
1696
UsingTree
($$"""
1747
UsingTree
($$"""
1837
UsingTree
($$"""
1914
UsingTree
($$"""
1965
UsingTree
($$"""
2024
UsingTree
($$"""
2083
UsingTree
($$"""
2147
UsingTree
($$"""
2220
UsingTree
($$$""""
2271
UsingTree
($$$""""
2328
UsingTree
($$"""
Parsing\FileModifierParsingTests.cs (1)
34
var tree =
UsingTree
(text, options, expectedParsingDiagnostics);
Parsing\FunctionPointerTests.cs (1)
1705
UsingTree
(@"
Parsing\LambdaReturnTypeParsingTests.cs (2)
5009
UsingTree
(source, TestOptions.Regular9);
5012
UsingTree
(source, TestOptions.Regular10);
Parsing\LocalFunctionParsingTests.cs (7)
356
var tree =
UsingTree
(@"
720
UsingTree
(code, TestOptions.Regular9).GetDiagnostics().Verify();
723
UsingTree
(code, TestOptions.Regular8);
806
UsingTree
(code, TestOptions.Regular9).GetDiagnostics().Verify();
809
UsingTree
(code, TestOptions.Regular8);
909
var tree =
UsingTree
(@"
989
var tree =
UsingTree
(@"
Parsing\MemberDeclarationParsingTests.cs (10)
2258
UsingTree
("""
3232
UsingTree
(text, options: options.WithLanguageVersion(version));
3924
UsingTree
("public int I.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview));
3979
UsingTree
("public int I<T>.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview));
5111
UsingTree
(text, options: options.WithLanguageVersion(version));
5772
UsingTree
("int I.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview));
5826
UsingTree
("int I<T>.operator +(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview));
7021
UsingTree
(text, options: options.WithLanguageVersion(version));
7625
UsingTree
("implicit I.operator int(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview));
7679
UsingTree
("explicit I<T>.operator int(int x) => x;", options: options.WithLanguageVersion(LanguageVersion.Preview));
Parsing\ParsingTests.cs (1)
147
return
UsingTree
(text, options: null, expectedErrors);
Parsing\PatternParsingTests.cs (1)
172
UsingTree
(@"
Parsing\RecordParsing.cs (24)
19
=>
UsingTree
(text, TestOptions.Regular9, expectedErrors);
108
UsingTree
(text, options: TestOptions.Regular8);
2728
UsingTree
(text, options: TestOptions.Regular10);
2732
UsingTree
(text, options: TestOptions.Regular9);
2863
UsingTree
(text, options: TestOptions.Regular10);
2914
UsingTree
(text, options: TestOptions.Regular10);
2927
UsingTree
(text, options: TestOptions.Regular9);
3298
UsingTree
(text, options: TestOptions.Regular8);
3318
UsingTree
(text, options: TestOptions.Regular9);
3338
UsingTree
(text, options: TestOptions.Regular10);
3540
UsingTree
(text, options: TestOptions.RegularPreview);
3561
UsingTree
(text, options: TestOptions.RegularPreview);
3582
UsingTree
(text, options: TestOptions.RegularPreview);
3602
UsingTree
(text, options: TestOptions.RegularPreview);
3636
UsingTree
(text, options: TestOptions.RegularPreview);
3671
UsingTree
(text, options: TestOptions.RegularPreview);
3692
UsingTree
(text, options: TestOptions.RegularPreview);
3797
UsingTree
(text, options: TestOptions.RegularPreview);
3844
UsingTree
(text, options: TestOptions.Regular9);
3869
UsingTree
(text, options: TestOptions.RegularPreview);
3873
UsingTree
(text, options: TestOptions.Regular8);
3917
UsingTree
(text, options: TestOptions.Regular9);
4053
UsingTree
(text, options: TestOptions.RegularPreview);
4096
UsingTree
(text, options: TestOptions.RegularPreview);
Parsing\ScriptParsingTests.cs (10)
2612
var tree =
UsingTree
(@"a * b;", TestOptions.Script);
2642
var tree =
UsingTree
(@"a * b", TestOptions.Script);
2675
var tree =
UsingTree
(@"a<t>.n * f(x)", TestOptions.Script);
2811
var tree =
UsingTree
(@"T ? a;", TestOptions.Script);
2841
var tree =
UsingTree
(@"T ? b, c = 1;", TestOptions.Script);
2884
var tree =
UsingTree
(@"T ? b = d => { };", TestOptions.Script);
2931
var tree =
UsingTree
(@"T ? b = x ? y : z;", TestOptions.Script);
6172
var tree =
UsingTree
(@"T ? u => { } : v => { }", TestOptions.Script);
6225
var tree =
UsingTree
(@"T ? u => (d ? e => 1 : f => 2)(3) : c => 2", TestOptions.Script);
8360
var tree =
UsingTree
(@"from", TestOptions.Script);
Parsing\TopLevelStatementsParsingTests.cs (1)
1621
var tree =
UsingTree
(test, TestOptions.RegularPreview.WithLanguageVersion(version));
Parsing\UsingDirectiveParsingTests.cs (7)
860
UsingTree
(text, options: TestOptions.Regular11);
4456
UsingTree
(text, options: TestOptions.Regular11);
4499
UsingTree
(text, options: TestOptions.Regular11);
4616
UsingTree
(text, options: TestOptions.Regular11);
4700
UsingTree
(text, options: TestOptions.Regular11);
4941
UsingTree
(text, options: TestOptions.Regular11);
5019
UsingTree
(text, options: TestOptions.Regular11);
Parsing\ValueTupleTests.cs (5)
28
var tree =
UsingTree
(@"
112
var tree =
UsingTree
(@"
226
var tree =
UsingTree
(@"
330
var tree =
UsingTree
(@"
436
var tree =
UsingTree
(@"
Syntax\SyntaxTreeTests.cs (24)
340
UsingTree
(test, TestOptions.Regular10);
375
UsingTree
(test, TestOptions.Regular9);
399
UsingTree
(test, TestOptions.Regular10);
447
UsingTree
(test, TestOptions.Regular9);
481
UsingTree
(test, TestOptions.Regular10);
517
UsingTree
(test, TestOptions.Regular9);
542
UsingTree
(test, TestOptions.Regular10);
591
UsingTree
(test, TestOptions.Regular9);
626
UsingTree
(test, TestOptions.RegularPreview);
672
UsingTree
(test, TestOptions.Regular9);
704
UsingTree
(test, TestOptions.RegularPreview);
763
UsingTree
(test, TestOptions.Regular9);
808
UsingTree
(test, TestOptions.RegularPreview,
839
UsingTree
(test, TestOptions.RegularPreview,
873
UsingTree
(test, TestOptions.RegularPreview,
914
UsingTree
(test, TestOptions.RegularPreview);
948
UsingTree
(test, TestOptions.Regular,
975
UsingTree
(test, TestOptions.RegularPreview,
1003
UsingTree
(test, TestOptions.Regular,
1039
UsingTree
(test, TestOptions.RegularPreview,
1080
UsingTree
(test, TestOptions.RegularPreview,
1121
UsingTree
(test, TestOptions.RegularPreview);
1177
UsingTree
(test, TestOptions.RegularPreview);
1249
UsingTree
(test, TestOptions.RegularPreview);