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