152 references to AddInsideMethod
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (152)
Completion\CompletionProviders\SuggestionModeCompletionProviderTests.cs (3)
29
await VerifyBuilderAsync(
AddInsideMethod
(@"Func<int, int, int> f = (int x, i $$"));
36
await VerifyBuilderAsync(
AddInsideMethod
(@"Func<int, int, int> f = (x, i $$"));
93
=> await VerifyBuilderAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"Func<int, int, int> f = $$")));
Completion\CompletionProviders\SymbolCompletionProviderTests.cs (148)
257
await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;",
AddInsideMethod
("string s = \"$$")), @"String");
258
await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;",
AddInsideMethod
("string s = \"$$")), @"System");
271
await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;",
AddInsideMethod
("string s = \"$$\";")), @"System");
272
await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;",
AddInsideMethod
("string s = \"$$\";")), @"String");
285
await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;",
AddInsideMethod
("char c = '$$")), @"System");
286
await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;",
AddInsideMethod
("char c = '$$")), @"String");
749
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = $$)c")), @"String");
750
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = $$)c")), @"System");
770
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = ($$)c")), @"String");
771
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = ($$)c")), @"System");
777
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = new $$")), @"String");
778
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = new $$")), @"System");
784
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = new $$ [")), @"String");
785
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = new $$ [")), @"System");
791
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = stackalloc $$")), @"String");
792
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = stackalloc $$")), @"System");
798
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from $$ c")), @"String");
799
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from $$ c")), @"System");
805
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C join $$ j")), @"String");
806
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C join $$ j")), @"System");
812
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$ i =")), @"String");
813
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$ i =")), @"System");
819
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"fixed($$")), @"String");
820
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"fixed($$")), @"System");
826
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"foreach($$")), @"String");
827
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"foreach($$")), @"System");
833
await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"foreach $$")), @"String");
834
await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"foreach $$")), @"System");
840
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"try {} catch($$")), @"String");
841
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"try {} catch($$")), @"System");
973
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"($$")), @"String");
974
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"($$")), @"System");
980
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$(")), @"String");
981
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$(")), @"System");
987
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$[")), @"String");
988
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$[")), @"System");
994
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"i[$$")), @"String");
995
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"i[$$")), @"System");
1001
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"(c)$$")), @"String");
1002
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"(c)$$")), @"System");
1008
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in $$")), @"String");
1009
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in $$")), @"System");
1015
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C let n = $$")), @"String");
1016
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C let n = $$")), @"System");
1022
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C orderby $$")), @"String");
1023
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C orderby $$")), @"System");
1029
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C select $$")), @"String");
1030
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C select $$")), @"System");
1036
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$")), @"String");
1037
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$")), @"System");
1043
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"return $$")), @"String");
1044
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"return $$")), @"System");
1050
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"throw $$")), @"String");
1051
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"throw $$")), @"System");
1057
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"yield return $$")), @"String");
1058
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"yield return $$")), @"System");
1064
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"foreach(T t in $$")), @"String");
1065
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"foreach(T t in $$")), @"System");
1071
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"using($$")), @"String");
1072
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"using($$")), @"System");
1078
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"lock($$")), @"String");
1079
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"lock($$")), @"System");
1085
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var i = $$")), @"String");
1086
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var i = $$")), @"System");
1092
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"for($$")), @"String");
1093
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"for($$")), @"System");
1099
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"for(i=0;$$")), @"String");
1100
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"for(i=0;$$")), @"System");
1106
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"for(i=0;i>10;$$")), @"String");
1107
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"for(i=0;i>10;$$")), @"System");
1113
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"do {} while($$")), @"String");
1114
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"do {} while($$")), @"System");
1120
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"while($$")), @"String");
1121
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"while($$")), @"System");
1127
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"int [$$")), @"String");
1128
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"int [$$")), @"System");
1134
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"+$$")), @"String");
1135
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"+$$")), @"System");
1141
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$++")), @"String");
1142
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$++")), @"System");
1148
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$ + 1")), @"String");
1149
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$ + 1")), @"System");
1155
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"1 + $$")), @"String");
1156
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"1 + $$")), @"System");
1162
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$ = 1")), @"String");
1163
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$ = 1")), @"System");
1169
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"1 = $$")), @"String");
1170
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"1 = $$")), @"System");
1176
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$? 1:")), @"String");
1177
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"$$? 1:")), @"System");
1183
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"true? $$:")), @"String");
1184
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"true? $$:")), @"System");
1190
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"true? 1:$$")), @"String");
1191
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"true? 1:$$")), @"System");
1197
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C join p in $$")), @"String");
1198
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C join p in $$")), @"System");
1204
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C join p in P on $$")), @"String");
1205
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C join p in P on $$")), @"System");
1211
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C join p in P on id equals $$")), @"String");
1212
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C join p in P on id equals $$")), @"System");
1218
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C where $$")), @"String");
1219
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C where $$")), @"System");
1225
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C group $$")), @"String");
1226
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C group $$")), @"System");
1232
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C group g by $$")), @"String");
1233
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = from c in C group g by $$")), @"System");
1239
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"if ($$")), @"String");
1240
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"if ($$")), @"System");
1246
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"switch($$")), @"String");
1247
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"switch($$")), @"System");
1254
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"String");
1255
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"System");
1262
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"String");
1263
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"System");
1270
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"String");
1271
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"System");
1278
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"String");
1279
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"System");
1286
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"String");
1287
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"System");
1294
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"String");
1295
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"System");
1302
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"String");
1303
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"System");
1310
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"String");
1311
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(content)), @"System");
1317
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = new [] { $$")), @"String");
1318
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"var t = new [] { $$")), @"System");
1472
await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"global::$$")), @"String");
1473
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"global::$$")), @"System");
1478
=> await VerifyItemExistsAsync(AddUsingDirectives("using S = System;",
AddInsideMethod
(@"S.$$")), @"String");
1482
=> await VerifyItemExistsAsync(AddUsingDirectives("using S = System.String;",
AddInsideMethod
(@"S.$$")), @"Empty");
1494
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"typeof($$")), @"String");
1495
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"typeof($$")), @"System");
1500
=> await VerifyItemIsAbsentAsync(
AddInsideMethod
(@"var x = 0; typeof($$"), @"x");
1505
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"sizeof($$")), @"String");
1506
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"sizeof($$")), @"System");
1511
=> await VerifyItemIsAbsentAsync(
AddInsideMethod
(@"var x = 0; sizeof($$"), @"x");
1516
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"default($$")), @"String");
1517
await VerifyItemExistsAsync(AddUsingDirectives("using System;",
AddInsideMethod
(@"default($$")), @"System");
1522
=> await VerifyItemIsAbsentAsync(
AddInsideMethod
(@"var x = 0; default($$"), @"x");
1526
=> await VerifyItemExistsAsync(
AddInsideMethod
(@"var x = 0; checked($$"), @"x");
1530
=> await VerifyItemExistsAsync(
AddInsideMethod
(@"var x = 0; unchecked($$"), @"x");
3799
await VerifyItemIsAbsentAsync(
AddInsideMethod
(
8879
await VerifyNoItemsExistAsync(
AddInsideMethod
(
8887
await VerifyNoItemsExistAsync(
AddInsideMethod
(
8895
await VerifyNoItemsExistAsync(
AddInsideMethod
(
8903
await VerifyItemExistsAsync(
AddInsideMethod
(
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (1)
155
=> await VerifyItemIsAbsentAsync(AddUsingDirectives("using System;",
AddInsideMethod
("string s = \"Console.$$")), @"Beep");