110 references to UsingExpression
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (110)
Parsing\CollectionExpressionParsingTests.cs (2)
22
UsingExpression
("[A, B]", TestOptions.Regular.WithLanguageVersion(languageVersion));
17098
UsingExpression
(text, TestOptions.Regular);
Parsing\DeclarationScopeParsingTests.cs (5)
895
UsingExpression
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
937
UsingExpression
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
1097
UsingExpression
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
1198
UsingExpression
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
1266
UsingExpression
(source, TestOptions.Regular.WithLanguageVersion(langVersion));
Parsing\ExpressionParsingTests.cs (8)
216
UsingExpression
(text, TestOptions.Regular7_3);
243
UsingExpression
(text, TestOptions.Regular8);
272
UsingExpression
(text, TestOptions.Regular7_3);
318
UsingExpression
(text, TestOptions.Regular8);
359
UsingExpression
(text, TestOptions.RegularPreview);
5251
UsingExpression
(test, TestOptions.Regular7_3);
6610
UsingExpression
("x >>> y", options);
6703
UsingExpression
("x >>>= y", options);
Parsing\FunctionPointerTests.cs (10)
1832
UsingExpression
("(delegate* unmanaged[thiscall]<int, C>)ptr", options: TestOptions.Regular9);
1886
UsingExpression
("ptr as delegate* unmanaged[stdcall]<int, void>", options: TestOptions.Regular9);
1939
UsingExpression
("((delegate*<int, void> i1, delegate* managed<C, D> i2))ptr", options: TestOptions.Regular9);
2023
UsingExpression
("new M<delegate* unmanaged[thiscall]<void>, delegate*<C, D>>()", options: TestOptions.Regular9);
2104
UsingExpression
("typeof(delegate* unmanaged[cdecl]<ref int, readonly ref D>)", options: TestOptions.Regular9);
2300
UsingExpression
("(delegate*<void> p1) => {}", options: TestOptions.Regular9);
2473
UsingExpression
("o is delegate*<void>", options: TestOptions.Regular9);
2505
UsingExpression
("o is delegate*<void> ptr", options: TestOptions.Regular9);
2665
UsingExpression
(@"
3038
UsingExpression
("sizeof(delegate*<void>)", options: TestOptions.Regular9);
Parsing\ImplicitObjectCreationParsingTests.cs (13)
47
UsingExpression
("new(Int32,Int32)?()", DefaultParseOptions);
114
UsingExpression
("new{}", DefaultParseOptions
181
UsingExpression
("new(x,y)[0]", DefaultParseOptions);
224
UsingExpression
("new(int,int)()", DefaultParseOptions);
260
UsingExpression
("new()[0]", DefaultParseOptions);
349
UsingExpression
($"new(Int32,Int32){SyntaxFacts.GetText(tokenKind),2}e", DefaultParseOptions);
389
UsingExpression
("new()", DefaultParseOptions);
416
UsingExpression
(test, options: TestOptions.Regular8);
433
UsingExpression
("new(){}", DefaultParseOptions);
465
UsingExpression
(test, options: TestOptions.Regular8);
487
UsingExpression
("new(1,2){x=y}", DefaultParseOptions);
552
UsingExpression
(test, options: TestOptions.Regular8);
601
UsingExpression
("new(1){2}", DefaultParseOptions);
Parsing\LambdaAttributeParsingTests.cs (27)
36
UsingExpression
(source, TestOptions.Regular9);
39
UsingExpression
(source, TestOptions.RegularPreview);
76
UsingExpression
(source, TestOptions.Regular9);
79
UsingExpression
(source, TestOptions.RegularPreview);
126
UsingExpression
(source, TestOptions.Regular9);
129
UsingExpression
(source, TestOptions.RegularPreview);
187
UsingExpression
(source, TestOptions.Regular9);
190
UsingExpression
(source, TestOptions.RegularPreview);
926
UsingExpression
($"f = {exprLambda}", TestOptions.RegularPreview);
944
UsingExpression
($"F({exprLambda})", TestOptions.RegularPreview);
969
UsingExpression
($"F(x, {exprLambda})", TestOptions.RegularPreview);
1002
UsingExpression
("f = ([A] x => x)", TestOptions.RegularPreview);
1104
UsingExpression
("new B { ([A] x => y) }", TestOptions.RegularPreview);
1154
UsingExpression
("[A] () => { } ++", TestOptions.RegularPreview);
1434
UsingExpression
("[A] () => x as E", TestOptions.RegularPreview);
1475
UsingExpression
("x ? [A] () => { } : z", TestOptions.RegularPreview);
1522
UsingExpression
("x ? () => { } : z", TestOptions.RegularPreview);
1557
UsingExpression
("x ? y : [A] () => { }", TestOptions.RegularPreview);
1605
UsingExpression
("x ? ([A] () => { }) : y", TestOptions.RegularPreview);
1700
UsingExpression
("x switch { y => [A] () => { }, _ => [A] () => z }", TestOptions.RegularPreview);
1789
UsingExpression
("([A] () => { }, y)", TestOptions.RegularPreview);
1839
UsingExpression
("(x, [A] () => { })", TestOptions.RegularPreview);
1889
UsingExpression
("s[[A] x => x..]", TestOptions.RegularPreview);
1991
UsingExpression
(source, TestOptions.Regular9);
1994
UsingExpression
(source, TestOptions.RegularPreview);
2792
UsingExpression
(source, TestOptions.Regular9);
2795
UsingExpression
(source, TestOptions.Regular10);
Parsing\LambdaReturnTypeParsingTests.cs (15)
42
UsingExpression
(source, TestOptions.Regular9);
45
UsingExpression
(source, TestOptions.RegularPreview);
79
UsingExpression
(source, TestOptions.Regular9);
82
UsingExpression
(source, TestOptions.RegularPreview);
126
UsingExpression
(source, TestOptions.Regular9);
129
UsingExpression
(source, TestOptions.RegularPreview);
172
UsingExpression
(source, parseOptions);
2882
UsingExpression
(source, options: TestOptions.Regular7);
2925
UsingExpression
(source, options: TestOptions.Regular7);
5054
UsingExpression
(source, TestOptions.Regular9);
5130
UsingExpression
(source, parseOptions);
5184
UsingExpression
(source, parseOptions);
5344
UsingExpression
(source, parseOptions);
5389
UsingExpression
(source, parseOptions);
5437
UsingExpression
(source, parseOptions);
Parsing\ParsingTests.cs (1)
142
UsingExpression
(text, options: null, expectedErrors);
Parsing\PatternParsingTests.cs (3)
2461
UsingExpression
(test, TestOptions.RegularWithoutRecursivePatterns);
2498
UsingExpression
(test, TestOptions.RegularWithoutRecursivePatterns);
2654
UsingExpression
("1 switch { (a, b, c) => d }", TestOptions.RegularWithoutRecursivePatterns);
Parsing\PatternParsingTests_ListPatterns.cs (4)
19
UsingExpression
(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview), expectedErrors);
32
UsingExpression
(@"c is [[]]", RegularWithoutListPatterns);
65
UsingExpression
(@"c is [[],] v", RegularWithoutListPatterns);
448
UsingExpression
(@"c is [..]", RegularWithoutListPatterns);
Parsing\PatternParsingTests2.cs (3)
18
UsingExpression
(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Preview), expectedErrors);
49
UsingExpression
(test, TestOptions.Regular10);
52
UsingExpression
(test, TestOptions.Regular9);
Parsing\RecordParsing.cs (1)
22
=>
UsingExpression
(text, TestOptions.Regular9, expectedErrors);
Parsing\RefFieldParsingTests.cs (3)
699
UsingExpression
(source, TestOptions.Regular.WithLanguageVersion(languageVersion));
848
UsingExpression
(source, TestOptions.Regular.WithLanguageVersion(languageVersion));
880
UsingExpression
(source, TestOptions.Regular.WithLanguageVersion(languageVersion));
Parsing\StackAllocInitializerParsingTests.cs (3)
33
UsingExpression
(test, options: TestOptions.Regular7);
80
UsingExpression
(test, options: TestOptions.Regular7);
127
UsingExpression
(test, options: TestOptions.Regular7);
Parsing\Utf8StringLiteralsParsingTests.cs (12)
114
UsingExpression
(@"""hello""u8", options: TestOptions.Regular11);
126
UsingExpression
(@"""hello""u8", options: TestOptions.Regular10);
150
UsingExpression
(@"@""hello""u8", options: TestOptions.Regular11);
162
UsingExpression
(@"@""hello""u8", options: TestOptions.Regular10);
186
UsingExpression
(@"""hello""U8", options: TestOptions.Regular11);
198
UsingExpression
(@"""hello""U8", options: TestOptions.Regular10);
222
UsingExpression
(@"@""hello""U8", options: TestOptions.Regular11);
234
UsingExpression
(@"@""hello""U8", options: TestOptions.Regular10);
598
UsingExpression
(@"""""""hello""""""" + suffix, options: options);
616
UsingExpression
(@"@""""""hello""""""" + suffix, options: options);
752
UsingExpression
(@"""""""
774
UsingExpression
(@"@""""""