Recommendations\AbstractKeywordRecommenderTests.cs (10)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
33await VerifyKeywordAsync(SourceCodeKind.Script,
41await VerifyKeywordAsync(SourceCodeKind.Script,
179await VerifyAbsenceAsync(SourceCodeKind.Regular,
187await VerifyAbsenceAsync(SourceCodeKind.Script,
195await VerifyAbsenceAsync(SourceCodeKind.Regular,
203await VerifyAbsenceAsync(SourceCodeKind.Script,
281await VerifyKeywordAsync(SourceCodeKind.Regular,
288await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\ClassKeywordRecommenderTests.cs (12)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
33await VerifyKeywordAsync(SourceCodeKind.Script,
41await VerifyKeywordAsync(SourceCodeKind.Script,
179await VerifyAbsenceAsync(SourceCodeKind.Regular,
187await VerifyAbsenceAsync(SourceCodeKind.Script,
195await VerifyAbsenceAsync(SourceCodeKind.Regular,
203await VerifyAbsenceAsync(SourceCodeKind.Script,
305await VerifyKeywordAsync(SourceCodeKind.Regular,
359await VerifyAbsenceAsync(SourceCodeKind.Regular,
369await VerifyAbsenceAsync(SourceCodeKind.Regular,
379await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\ConstKeywordRecommenderTests.cs (14)
130[InlineData(SourceCodeKind.Regular)]
131[InlineData(SourceCodeKind.Script, Skip = "https://github.com/dotnet/roslyn/issues/9880")]
132public async Task TestNotBeforeUsing(SourceCodeKind sourceCodeKind)
140[InlineData(SourceCodeKind.Regular)]
141[InlineData(SourceCodeKind.Script, Skip = "https://github.com/dotnet/roslyn/issues/9880")]
142public async Task TestNotBeforeGlobalUsing(SourceCodeKind sourceCodeKind)
159await VerifyKeywordAsync(SourceCodeKind.Regular, @"[goo]
166await VerifyKeywordAsync(SourceCodeKind.Script, @"[goo]
219=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$");
223=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$");
235=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$");
239=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
252await VerifyAbsenceAsync(SourceCodeKind.Regular,
259await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\DelegateKeywordRecommenderTests.cs (14)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
33await VerifyKeywordAsync(SourceCodeKind.Script,
41await VerifyKeywordAsync(SourceCodeKind.Script,
187await VerifyAbsenceAsync(SourceCodeKind.Regular,
195await VerifyAbsenceAsync(SourceCodeKind.Script,
203await VerifyAbsenceAsync(SourceCodeKind.Regular,
211await VerifyAbsenceAsync(SourceCodeKind.Script,
307await VerifyKeywordAsync(SourceCodeKind.Regular, @"static $$");
308await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
315await VerifyKeywordAsync(SourceCodeKind.Regular, AddInsideMethod(@$"{keyword} $$"));
316await VerifyKeywordAsync(SourceCodeKind.Script, AddInsideMethod(@$"{keyword} $$"));
322await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
323await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\EventKeywordRecommenderTests.cs (32)
19await VerifyKeywordAsync(SourceCodeKind.Script,
26await VerifyKeywordAsync(SourceCodeKind.Script,
34await VerifyKeywordAsync(SourceCodeKind.Script,
42await VerifyKeywordAsync(SourceCodeKind.Script,
70=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$");
75await VerifyAbsenceAsync(SourceCodeKind.Regular, @"extern alias Goo;
82await VerifyKeywordAsync(SourceCodeKind.Script, @"extern alias Goo;
89await VerifyAbsenceAsync(SourceCodeKind.Regular, @"using Goo;
96await VerifyKeywordAsync(SourceCodeKind.Script, @"using Goo;
103await VerifyAbsenceAsync(SourceCodeKind.Regular, @"global using Goo;
110await VerifyKeywordAsync(SourceCodeKind.Script, @"global using Goo;
117await VerifyAbsenceAsync(SourceCodeKind.Regular, @"namespace N {}
124await VerifyAbsenceAsync(SourceCodeKind.Regular, @"class C {}
131await VerifyAbsenceAsync(SourceCodeKind.Regular, @"delegate void Goo();
165await VerifyAbsenceAsync(SourceCodeKind.Regular,
173await VerifyAbsenceAsync(SourceCodeKind.Script,
181await VerifyAbsenceAsync(SourceCodeKind.Regular,
189await VerifyAbsenceAsync(SourceCodeKind.Script,
197await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[assembly: goo]
204await VerifyKeywordAsync(SourceCodeKind.Script, @"[assembly: goo]
211await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[goo]
218await VerifyKeywordAsync(SourceCodeKind.Script, @"[goo]
275=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$");
279=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$");
291=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$");
295=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
308await VerifyAbsenceAsync(SourceCodeKind.Regular,
315await VerifyKeywordAsync(SourceCodeKind.Script,
364=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$");
368=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
380=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
384=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\NamespaceKeywordRecommenderTests.cs (36)
31await VerifyAbsenceAsync(SourceCodeKind.Script,
39await VerifyAbsenceAsync(SourceCodeKind.Script,
47await VerifyAbsenceAsync(SourceCodeKind.Script,
62await VerifyKeywordAsync(SourceCodeKind.Regular,
69await VerifyAbsenceAsync(SourceCodeKind.Script,
80await VerifyKeywordAsync(SourceCodeKind.Regular,
88await VerifyAbsenceAsync(SourceCodeKind.Regular,
96await VerifyAbsenceAsync(SourceCodeKind.Regular,
105await VerifyKeywordAsync(SourceCodeKind.Regular,
116await VerifyAbsenceAsync(SourceCodeKind.Script,
124await VerifyKeywordAsync(SourceCodeKind.Regular,
132await VerifyAbsenceAsync(SourceCodeKind.Script,
140await VerifyAbsenceAsync(SourceCodeKind.Regular,
149await VerifyKeywordAsync(SourceCodeKind.Regular,
160await VerifyKeywordAsync(SourceCodeKind.Regular,
168await VerifyKeywordAsync(SourceCodeKind.Regular,
176await VerifyAbsenceAsync(SourceCodeKind.Script,
184await VerifyAbsenceAsync(SourceCodeKind.Script,
192await VerifyKeywordAsync(SourceCodeKind.Regular,
200await VerifyAbsenceAsync(SourceCodeKind.Script,
208await VerifyKeywordAsync(SourceCodeKind.Regular,
216await VerifyAbsenceAsync(SourceCodeKind.Script,
224await VerifyKeywordAsync(SourceCodeKind.Regular,
232await VerifyAbsenceAsync(SourceCodeKind.Script,
240await VerifyKeywordAsync(SourceCodeKind.Regular,
248await VerifyAbsenceAsync(SourceCodeKind.Script,
273await VerifyKeywordAsync(SourceCodeKind.Regular,
281await VerifyAbsenceAsync(SourceCodeKind.Script,
296await VerifyKeywordAsync(SourceCodeKind.Regular,
305await VerifyAbsenceAsync(SourceCodeKind.Script,
322await VerifyKeywordAsync(SourceCodeKind.Regular,
331await VerifyAbsenceAsync(SourceCodeKind.Script,
397await VerifyKeywordAsync(SourceCodeKind.Regular,
405await VerifyAbsenceAsync(SourceCodeKind.Script,
430await VerifyKeywordAsync(SourceCodeKind.Regular,
443await VerifyAbsenceAsync(SourceCodeKind.Script,
Recommendations\NewKeywordRecommenderTests.cs (18)
745await VerifyAbsenceAsync(SourceCodeKind.Regular,
753await VerifyAbsenceAsync(SourceCodeKind.Script,
761await VerifyAbsenceAsync(SourceCodeKind.Regular,
769await VerifyAbsenceAsync(SourceCodeKind.Script,
784await VerifyKeywordAsync(SourceCodeKind.Regular, @"[goo]
792await VerifyKeywordAsync(SourceCodeKind.Script, @"[goo]
839=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$");
843=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$");
847=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$");
851=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
855=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static internal $$");
859=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static internal $$");
863=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal static $$");
867=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal static $$");
880await VerifyAbsenceAsync(SourceCodeKind.Regular,
887await VerifyKeywordAsync(SourceCodeKind.Script,
897=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$");
901=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
Recommendations\PartialKeywordRecommenderTests.cs (11)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
33await VerifyKeywordAsync(SourceCodeKind.Script,
41await VerifyKeywordAsync(SourceCodeKind.Script,
169await VerifyAbsenceAsync(SourceCodeKind.Regular,
177await VerifyAbsenceAsync(SourceCodeKind.Script,
185await VerifyAbsenceAsync(SourceCodeKind.Regular,
193await VerifyAbsenceAsync(SourceCodeKind.Script,
352await VerifyAbsenceAsync(SourceCodeKind.Regular,
362await VerifyAbsenceAsync(SourceCodeKind.Regular,
372await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\PrivateKeywordRecommenderTests.cs (25)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
33await VerifyKeywordAsync(SourceCodeKind.Script,
41await VerifyKeywordAsync(SourceCodeKind.Script,
69=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$");
74await VerifyAbsenceAsync(SourceCodeKind.Regular, @"extern alias Goo;
81await VerifyKeywordAsync(SourceCodeKind.Script, @"extern alias Goo;
88await VerifyAbsenceAsync(SourceCodeKind.Regular, @"using Goo;
95await VerifyKeywordAsync(SourceCodeKind.Script, @"using Goo;
102await VerifyAbsenceAsync(SourceCodeKind.Regular, @"global using Goo;
109await VerifyKeywordAsync(SourceCodeKind.Script, @"global using Goo;
116await VerifyAbsenceAsync(SourceCodeKind.Regular, @"namespace N {}
123await VerifyAbsenceAsync(SourceCodeKind.Regular,
131await VerifyAbsenceAsync(SourceCodeKind.Regular, @"class C {}
138await VerifyAbsenceAsync(SourceCodeKind.Regular, @"delegate void Goo();
172await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$
179await VerifyAbsenceAsync(SourceCodeKind.Script, @"$$
186await VerifyAbsenceAsync(SourceCodeKind.Regular,
194await VerifyAbsenceAsync(SourceCodeKind.Script,
202await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[assembly: goo]
209await VerifyKeywordAsync(SourceCodeKind.Script, @"[assembly: goo]
216await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[goo]
223await VerifyKeywordAsync(SourceCodeKind.Script, @"[goo]
323=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$");
327=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
Recommendations\PublicKeywordRecommenderTests.cs (11)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
33await VerifyKeywordAsync(SourceCodeKind.Script,
41await VerifyKeywordAsync(SourceCodeKind.Script,
160await VerifyAbsenceAsync(SourceCodeKind.Regular,
168await VerifyAbsenceAsync(SourceCodeKind.Script,
176await VerifyAbsenceAsync(SourceCodeKind.Regular,
184await VerifyAbsenceAsync(SourceCodeKind.Script,
318await VerifyAbsenceAsync(SourceCodeKind.Regular,
328await VerifyAbsenceAsync(SourceCodeKind.Regular,
338await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\RecordKeywordRecommenderTests.cs (12)
19await VerifyKeywordAsync(SourceCodeKind.Script,
26await VerifyKeywordAsync(SourceCodeKind.Script,
34await VerifyKeywordAsync(SourceCodeKind.Script,
42await VerifyKeywordAsync(SourceCodeKind.Script,
180await VerifyAbsenceAsync(SourceCodeKind.Regular,
188await VerifyAbsenceAsync(SourceCodeKind.Script,
196await VerifyAbsenceAsync(SourceCodeKind.Regular,
204await VerifyAbsenceAsync(SourceCodeKind.Script,
312await VerifyKeywordAsync(SourceCodeKind.Regular,
398await VerifyAbsenceAsync(SourceCodeKind.Regular,
408await VerifyAbsenceAsync(SourceCodeKind.Regular,
418await VerifyAbsenceAsync(SourceCodeKind.Regular,
Recommendations\RefKeywordRecommenderTests.cs (13)
545=> await VerifyKeywordAsync(SourceCodeKind.Regular, @"file $$");
771[InlineData(SourceCodeKind.Regular, true)]
772[InlineData(SourceCodeKind.Regular, false)]
773[InlineData(SourceCodeKind.Script, true, Skip = "https://github.com/dotnet/roslyn/issues/44630")]
774[InlineData(SourceCodeKind.Script, false)]
775public async Task TestInConditionalExpressionTrueBranch(SourceCodeKind sourceCodeKind, bool topLevelStatement)
781options: sourceCodeKind == SourceCodeKind.Script ? Options.Script : CSharp9ParseOptions);
785[InlineData(SourceCodeKind.Regular, true)]
786[InlineData(SourceCodeKind.Regular, false)]
787[InlineData(SourceCodeKind.Script, true, Skip = "https://github.com/dotnet/roslyn/issues/44630")]
788[InlineData(SourceCodeKind.Script, false)]
789public async Task TestInConditionalExpressionFalseBranch(SourceCodeKind sourceCodeKind, bool topLevelStatement)
796options: sourceCodeKind == SourceCodeKind.Script ? Options.Script : CSharp9ParseOptions);
Recommendations\ReturnKeywordRecommenderTests.cs (10)
18await VerifyAbsenceAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Regular,
32await VerifyAbsenceAsync(SourceCodeKind.Script,
40await VerifyKeywordAsync(SourceCodeKind.Regular,
48await VerifyAbsenceAsync(SourceCodeKind.Script,
56await VerifyKeywordAsync(SourceCodeKind.Regular,
64await VerifyAbsenceAsync(SourceCodeKind.Script,
72await VerifyKeywordAsync(SourceCodeKind.Regular,
253await VerifyAbsenceAsync(SourceCodeKind.Regular,
260await VerifyKeywordAsync(SourceCodeKind.Script,
Recommendations\StructKeywordRecommenderTests.cs (18)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
33await VerifyKeywordAsync(SourceCodeKind.Script,
41await VerifyKeywordAsync(SourceCodeKind.Script,
179await VerifyAbsenceAsync(SourceCodeKind.Regular,
187await VerifyAbsenceAsync(SourceCodeKind.Regular,
195await VerifyKeywordAsync(SourceCodeKind.Regular,
202await VerifyKeywordAsync(SourceCodeKind.Regular,
209await VerifyKeywordAsync(SourceCodeKind.Regular,
216await VerifyKeywordAsync(SourceCodeKind.Regular,
223await VerifyKeywordAsync(SourceCodeKind.Regular,
230await VerifyKeywordAsync(SourceCodeKind.Regular,
237await VerifyAbsenceAsync(SourceCodeKind.Regular,
244await VerifyAbsenceAsync(SourceCodeKind.Regular,
251await VerifyAbsenceAsync(SourceCodeKind.Script,
259await VerifyAbsenceAsync(SourceCodeKind.Script,
340await VerifyKeywordAsync(SourceCodeKind.Regular,
361await VerifyKeywordAsync(SourceCodeKind.Regular,
Recommendations\VoidKeywordRecommenderTests.cs (14)
33await VerifyKeywordAsync(SourceCodeKind.Script,
41await VerifyKeywordAsync(SourceCodeKind.Script,
171await VerifyAbsenceAsync(SourceCodeKind.Regular,
179await VerifyAbsenceAsync(SourceCodeKind.Script,
187await VerifyAbsenceAsync(SourceCodeKind.Regular,
195await VerifyAbsenceAsync(SourceCodeKind.Script,
280=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$");
284=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$");
296=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$");
300=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
313await VerifyAbsenceAsync(SourceCodeKind.Regular,
320await VerifyKeywordAsync(SourceCodeKind.Script,
373=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
377=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");
Recommendations\VolatileKeywordRecommenderTests.cs (32)
18await VerifyKeywordAsync(SourceCodeKind.Script,
25await VerifyKeywordAsync(SourceCodeKind.Script,
33await VerifyKeywordAsync(SourceCodeKind.Script,
41await VerifyKeywordAsync(SourceCodeKind.Script,
69=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"$$");
74await VerifyAbsenceAsync(SourceCodeKind.Regular, @"extern alias Goo;
81await VerifyKeywordAsync(SourceCodeKind.Script, @"extern alias Goo;
88await VerifyAbsenceAsync(SourceCodeKind.Regular, @"using Goo;
95await VerifyKeywordAsync(SourceCodeKind.Script, @"using Goo;
102await VerifyAbsenceAsync(SourceCodeKind.Regular, @"global using Goo;
109await VerifyKeywordAsync(SourceCodeKind.Script, @"global using Goo;
116await VerifyAbsenceAsync(SourceCodeKind.Regular, @"namespace N {}
123await VerifyAbsenceAsync(SourceCodeKind.Regular, @"class C {}
130await VerifyAbsenceAsync(SourceCodeKind.Regular, @"delegate void Goo();
164await VerifyAbsenceAsync(SourceCodeKind.Regular,
172await VerifyAbsenceAsync(SourceCodeKind.Script,
180await VerifyAbsenceAsync(SourceCodeKind.Regular,
188await VerifyAbsenceAsync(SourceCodeKind.Script,
196await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[assembly: goo]
203await VerifyKeywordAsync(SourceCodeKind.Script, @"[assembly: goo]
210await VerifyAbsenceAsync(SourceCodeKind.Regular, @"[goo]
217await VerifyKeywordAsync(SourceCodeKind.Script, @"[goo]
270=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"internal $$");
274=> await VerifyKeywordAsync(SourceCodeKind.Script, @"internal $$");
286=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"public $$");
290=> await VerifyKeywordAsync(SourceCodeKind.Script, @"public $$");
303await VerifyAbsenceAsync(SourceCodeKind.Regular,
310await VerifyKeywordAsync(SourceCodeKind.Script,
351=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static $$");
355=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static $$");
367=> await VerifyAbsenceAsync(SourceCodeKind.Regular, @"static public $$");
371=> await VerifyKeywordAsync(SourceCodeKind.Script, @"static public $$");