Recommendations\AbstractKeywordRecommenderTests.cs (10)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
35await VerifyKeywordAsync(SourceCodeKind.Script,
45await VerifyKeywordAsync(SourceCodeKind.Script,
209await VerifyAbsenceAsync(SourceCodeKind.Regular,
219await VerifyAbsenceAsync(SourceCodeKind.Script,
229await VerifyAbsenceAsync(SourceCodeKind.Regular,
239await VerifyAbsenceAsync(SourceCodeKind.Script,
331await VerifyKeywordAsync(SourceCodeKind.Regular,
338await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\ClassKeywordRecommenderTests.cs (12)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
35await VerifyKeywordAsync(SourceCodeKind.Script,
45await VerifyKeywordAsync(SourceCodeKind.Script,
209await VerifyAbsenceAsync(SourceCodeKind.Regular,
219await VerifyAbsenceAsync(SourceCodeKind.Script,
229await VerifyAbsenceAsync(SourceCodeKind.Regular,
239await VerifyAbsenceAsync(SourceCodeKind.Script,
355await VerifyKeywordAsync(SourceCodeKind.Regular,
409await VerifyAbsenceAsync(SourceCodeKind.Regular,
421await VerifyAbsenceAsync(SourceCodeKind.Regular,
433await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ConstKeywordRecommenderTests.cs (14)
151[InlineData(SourceCodeKind.Regular)]
152[InlineData(SourceCodeKind.Script, Skip = "https://github.com/dotnet/roslyn/issues/9880")]
153public async Task TestNotBeforeUsing(SourceCodeKind sourceCodeKind)
163[InlineData(SourceCodeKind.Regular)]
164[InlineData(SourceCodeKind.Script, Skip = "https://github.com/dotnet/roslyn/issues/9880")]
165public async Task TestNotBeforeGlobalUsing(SourceCodeKind sourceCodeKind)
186await VerifyKeywordAsync(SourceCodeKind.Regular, """
195await VerifyKeywordAsync(SourceCodeKind.Script, """
260=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$");
264=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$");
278=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$");
282=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
297await VerifyAbsenceAsync(SourceCodeKind.Regular,
304await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\DelegateKeywordRecommenderTests.cs (14)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
35await VerifyKeywordAsync(SourceCodeKind.Script,
45await VerifyKeywordAsync(SourceCodeKind.Script,
213await VerifyAbsenceAsync(SourceCodeKind.Regular,
223await VerifyAbsenceAsync(SourceCodeKind.Script,
233await VerifyAbsenceAsync(SourceCodeKind.Regular,
243await VerifyAbsenceAsync(SourceCodeKind.Script,
353await VerifyKeywordAsync(SourceCodeKind.Regular, @"static $$");
354await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
361await VerifyKeywordAsync(SourceCodeKind.Regular, AddInsideMethod(@$"{keyword} $$"));
362await VerifyKeywordAsync(SourceCodeKind.Script, AddInsideMethod(@$"{keyword} $$"));
368await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
369await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\EventKeywordRecommenderTests.cs (32)
19await VerifyKeywordAsync(SourceCodeKind.Script,
26await VerifyKeywordAsync(SourceCodeKind.Script,
36await VerifyKeywordAsync(SourceCodeKind.Script,
46await VerifyKeywordAsync(SourceCodeKind.Script,
76=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$");
81await VerifyAbsenceAsync(SourceCodeKind.Regular, """
90await VerifyKeywordAsync(SourceCodeKind.Script, """
99await VerifyAbsenceAsync(SourceCodeKind.Regular, """
108await VerifyKeywordAsync(SourceCodeKind.Script, """
117await VerifyAbsenceAsync(SourceCodeKind.Regular, """
126await VerifyKeywordAsync(SourceCodeKind.Script, """
135await VerifyAbsenceAsync(SourceCodeKind.Regular, """
144await VerifyAbsenceAsync(SourceCodeKind.Regular, """
153await VerifyAbsenceAsync(SourceCodeKind.Regular, """
195await VerifyAbsenceAsync(SourceCodeKind.Regular,
205await VerifyAbsenceAsync(SourceCodeKind.Script,
215await VerifyAbsenceAsync(SourceCodeKind.Regular,
225await VerifyAbsenceAsync(SourceCodeKind.Script,
235await VerifyAbsenceAsync(SourceCodeKind.Regular, """
244await VerifyKeywordAsync(SourceCodeKind.Script, """
253await VerifyAbsenceAsync(SourceCodeKind.Regular, """
262await VerifyKeywordAsync(SourceCodeKind.Script, """
331=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$");
335=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$");
349=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$");
353=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
368await VerifyAbsenceAsync(SourceCodeKind.Regular,
375await VerifyKeywordAsync(SourceCodeKind.Script,
432=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$");
436=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
450=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
454=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\NamespaceKeywordRecommenderTests.cs (36)
31await VerifyAbsenceAsync(SourceCodeKind.Script,
41await VerifyAbsenceAsync(SourceCodeKind.Script,
51await VerifyAbsenceAsync(SourceCodeKind.Script,
68await VerifyKeywordAsync(SourceCodeKind.Regular,
75await VerifyAbsenceAsync(SourceCodeKind.Script,
86await VerifyKeywordAsync(SourceCodeKind.Regular,
96await VerifyAbsenceAsync(SourceCodeKind.Regular,
106await VerifyAbsenceAsync(SourceCodeKind.Regular,
117await VerifyKeywordAsync(SourceCodeKind.Regular,
130await VerifyAbsenceAsync(SourceCodeKind.Script,
140await VerifyKeywordAsync(SourceCodeKind.Regular,
150await VerifyAbsenceAsync(SourceCodeKind.Script,
160await VerifyAbsenceAsync(SourceCodeKind.Regular,
171await VerifyKeywordAsync(SourceCodeKind.Regular,
184await VerifyKeywordAsync(SourceCodeKind.Regular,
194await VerifyKeywordAsync(SourceCodeKind.Regular,
204await VerifyAbsenceAsync(SourceCodeKind.Script,
214await VerifyAbsenceAsync(SourceCodeKind.Script,
224await VerifyKeywordAsync(SourceCodeKind.Regular,
234await VerifyAbsenceAsync(SourceCodeKind.Script,
244await VerifyKeywordAsync(SourceCodeKind.Regular,
254await VerifyAbsenceAsync(SourceCodeKind.Script,
264await VerifyKeywordAsync(SourceCodeKind.Regular,
274await VerifyAbsenceAsync(SourceCodeKind.Script,
284await VerifyKeywordAsync(SourceCodeKind.Regular,
294await VerifyAbsenceAsync(SourceCodeKind.Script,
325await VerifyKeywordAsync(SourceCodeKind.Regular,
335await VerifyAbsenceAsync(SourceCodeKind.Script,
354await VerifyKeywordAsync(SourceCodeKind.Regular,
365await VerifyAbsenceAsync(SourceCodeKind.Script,
386await VerifyKeywordAsync(SourceCodeKind.Regular,
397await VerifyAbsenceAsync(SourceCodeKind.Script,
479await VerifyKeywordAsync(SourceCodeKind.Regular,
489await VerifyAbsenceAsync(SourceCodeKind.Script,
520await VerifyKeywordAsync(SourceCodeKind.Regular,
535await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\NewKeywordRecommenderTests.cs (18)
729await VerifyAbsenceAsync(SourceCodeKind.Regular,
739await VerifyAbsenceAsync(SourceCodeKind.Script,
749await VerifyAbsenceAsync(SourceCodeKind.Regular,
759await VerifyAbsenceAsync(SourceCodeKind.Script,
778await VerifyKeywordAsync(SourceCodeKind.Regular, """
788await VerifyKeywordAsync(SourceCodeKind.Script, """
845=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$");
849=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$");
853=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$");
857=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
861=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static internal $$");
865=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static internal $$");
869=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal static $$");
873=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal static $$");
886await VerifyAbsenceAsync(SourceCodeKind.Regular,
893await VerifyKeywordAsync(SourceCodeKind.Script,
903=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$");
907=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
Recommendations\PartialKeywordRecommenderTests.cs (11)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
35await VerifyKeywordAsync(SourceCodeKind.Script,
45await VerifyKeywordAsync(SourceCodeKind.Script,
197await VerifyAbsenceAsync(SourceCodeKind.Regular,
207await VerifyAbsenceAsync(SourceCodeKind.Script,
217await VerifyAbsenceAsync(SourceCodeKind.Regular,
227await VerifyAbsenceAsync(SourceCodeKind.Script,
402await VerifyAbsenceAsync(SourceCodeKind.Regular,
414await VerifyAbsenceAsync(SourceCodeKind.Regular,
426await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\PrivateKeywordRecommenderTests.cs (25)
17await VerifyKeywordAsync(SourceCodeKind.Script,
24await VerifyKeywordAsync(SourceCodeKind.Script,
34await VerifyKeywordAsync(SourceCodeKind.Script,
44await VerifyKeywordAsync(SourceCodeKind.Script,
74=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$");
79await VerifyAbsenceAsync(SourceCodeKind.Regular, """
88await VerifyKeywordAsync(SourceCodeKind.Script, """
97await VerifyAbsenceAsync(SourceCodeKind.Regular, """
106await VerifyKeywordAsync(SourceCodeKind.Script, """
115await VerifyAbsenceAsync(SourceCodeKind.Regular, """
124await VerifyKeywordAsync(SourceCodeKind.Script, """
133await VerifyAbsenceAsync(SourceCodeKind.Regular, """
142await VerifyAbsenceAsync(SourceCodeKind.Regular,
152await VerifyAbsenceAsync(SourceCodeKind.Regular, """
161await VerifyAbsenceAsync(SourceCodeKind.Regular, """
203await VerifyAbsenceAsync(SourceCodeKind.Regular, """
212await VerifyAbsenceAsync(SourceCodeKind.Script, """
221await VerifyAbsenceAsync(SourceCodeKind.Regular,
231await VerifyAbsenceAsync(SourceCodeKind.Script,
241await VerifyAbsenceAsync(SourceCodeKind.Regular, """
250await VerifyKeywordAsync(SourceCodeKind.Script, """
259await VerifyAbsenceAsync(SourceCodeKind.Regular, """
268await VerifyKeywordAsync(SourceCodeKind.Script, """
382=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$");
386=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
Recommendations\PublicKeywordRecommenderTests.cs (11)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
35await VerifyKeywordAsync(SourceCodeKind.Script,
45await VerifyKeywordAsync(SourceCodeKind.Script,
186await VerifyAbsenceAsync(SourceCodeKind.Regular,
196await VerifyAbsenceAsync(SourceCodeKind.Script,
206await VerifyAbsenceAsync(SourceCodeKind.Regular,
216await VerifyAbsenceAsync(SourceCodeKind.Script,
364await VerifyAbsenceAsync(SourceCodeKind.Regular,
376await VerifyAbsenceAsync(SourceCodeKind.Regular,
388await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\RecordKeywordRecommenderTests.cs (12)
19await VerifyKeywordAsync(SourceCodeKind.Script,
26await VerifyKeywordAsync(SourceCodeKind.Script,
36await VerifyKeywordAsync(SourceCodeKind.Script,
46await VerifyKeywordAsync(SourceCodeKind.Script,
210await VerifyAbsenceAsync(SourceCodeKind.Regular,
220await VerifyAbsenceAsync(SourceCodeKind.Script,
230await VerifyAbsenceAsync(SourceCodeKind.Regular,
240await VerifyAbsenceAsync(SourceCodeKind.Script,
368await VerifyKeywordAsync(SourceCodeKind.Regular,
454await VerifyAbsenceAsync(SourceCodeKind.Regular,
466await VerifyAbsenceAsync(SourceCodeKind.Regular,
478await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\RefKeywordRecommenderTests.cs (13)
603=> await VerifyKeywordAsync(SourceCodeKind.Regular, @"file $$");
855[InlineData(SourceCodeKind.Regular, true)]
856[InlineData(SourceCodeKind.Regular, false)]
857[InlineData(SourceCodeKind.Script, true, Skip = "https://github.com/dotnet/roslyn/issues/44630")]
858[InlineData(SourceCodeKind.Script, false)]
859public async Task TestInConditionalExpressionTrueBranch(SourceCodeKind sourceCodeKind, bool topLevelStatement)
866options: sourceCodeKind == SourceCodeKind.Script ? Options.Script : CSharp9ParseOptions);
870[InlineData(SourceCodeKind.Regular, true)]
871[InlineData(SourceCodeKind.Regular, false)]
872[InlineData(SourceCodeKind.Script, true, Skip = "https://github.com/dotnet/roslyn/issues/44630")]
873[InlineData(SourceCodeKind.Script, false)]
874public async Task TestInConditionalExpressionFalseBranch(SourceCodeKind sourceCodeKind, bool topLevelStatement)
882options: sourceCodeKind == SourceCodeKind.Script ? Options.Script : CSharp9ParseOptions);
Recommendations\ReturnKeywordRecommenderTests.cs (10)
18await VerifyAbsenceAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Regular,
32await VerifyAbsenceAsync(SourceCodeKind.Script,
42await VerifyKeywordAsync(SourceCodeKind.Regular,
52await VerifyAbsenceAsync(SourceCodeKind.Script,
62await VerifyKeywordAsync(SourceCodeKind.Regular,
72await VerifyAbsenceAsync(SourceCodeKind.Script,
82await VerifyKeywordAsync(SourceCodeKind.Regular,
287await VerifyAbsenceAsync(SourceCodeKind.Regular,
294await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\StructKeywordRecommenderTests.cs (18)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
35await VerifyKeywordAsync(SourceCodeKind.Script,
45await VerifyKeywordAsync(SourceCodeKind.Script,
209await VerifyAbsenceAsync(SourceCodeKind.Regular,
219await VerifyAbsenceAsync(SourceCodeKind.Regular,
229await VerifyKeywordAsync(SourceCodeKind.Regular,
236await VerifyKeywordAsync(SourceCodeKind.Regular,
243await VerifyKeywordAsync(SourceCodeKind.Regular,
250await VerifyKeywordAsync(SourceCodeKind.Regular,
257await VerifyKeywordAsync(SourceCodeKind.Regular,
264await VerifyKeywordAsync(SourceCodeKind.Regular,
271await VerifyAbsenceAsync(SourceCodeKind.Regular,
278await VerifyAbsenceAsync(SourceCodeKind.Regular,
285await VerifyAbsenceAsync(SourceCodeKind.Script,
295await VerifyAbsenceAsync(SourceCodeKind.Script,
390await VerifyKeywordAsync(SourceCodeKind.Regular,
411await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\VoidKeywordRecommenderTests.cs (14)
35await VerifyKeywordAsync(SourceCodeKind.Script,
45await VerifyKeywordAsync(SourceCodeKind.Script,
192await VerifyAbsenceAsync(SourceCodeKind.Regular,
202await VerifyAbsenceAsync(SourceCodeKind.Script,
212await VerifyAbsenceAsync(SourceCodeKind.Regular,
222await VerifyAbsenceAsync(SourceCodeKind.Script,
327=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$");
331=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$");
345=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$");
349=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
364await VerifyAbsenceAsync(SourceCodeKind.Regular,
371await VerifyKeywordAsync(SourceCodeKind.Script,
432=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
436=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\VolatileKeywordRecommenderTests.cs (32)
17await VerifyKeywordAsync(SourceCodeKind.Script,
24await VerifyKeywordAsync(SourceCodeKind.Script,
34await VerifyKeywordAsync(SourceCodeKind.Script,
44await VerifyKeywordAsync(SourceCodeKind.Script,
74=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$");
79await VerifyAbsenceAsync(SourceCodeKind.Regular, """
88await VerifyKeywordAsync(SourceCodeKind.Script, """
97await VerifyAbsenceAsync(SourceCodeKind.Regular, """
106await VerifyKeywordAsync(SourceCodeKind.Script, """
115await VerifyAbsenceAsync(SourceCodeKind.Regular, """
124await VerifyKeywordAsync(SourceCodeKind.Script, """
133await VerifyAbsenceAsync(SourceCodeKind.Regular, """
142await VerifyAbsenceAsync(SourceCodeKind.Regular, """
151await VerifyAbsenceAsync(SourceCodeKind.Regular, """
193await VerifyAbsenceAsync(SourceCodeKind.Regular,
203await VerifyAbsenceAsync(SourceCodeKind.Script,
213await VerifyAbsenceAsync(SourceCodeKind.Regular,
223await VerifyAbsenceAsync(SourceCodeKind.Script,
233await VerifyAbsenceAsync(SourceCodeKind.Regular, """
242await VerifyKeywordAsync(SourceCodeKind.Script, """
251await VerifyAbsenceAsync(SourceCodeKind.Regular, """
260await VerifyKeywordAsync(SourceCodeKind.Script, """
325=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$");
329=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$");
343=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$");
347=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
362await VerifyAbsenceAsync(SourceCodeKind.Regular,
369await VerifyKeywordAsync(SourceCodeKind.Script,
416=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$");
420=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
434=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
438=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");