148 references to AddInsideMethod
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (148)
Extensions\ContextQuery\IsPossibleDeconstructionDesignationTests.cs (26)
26=> VerifyTrue(AddInsideMethod(@"(var $$, var y)")); 30=> VerifyTrue(AddInsideMethod(@"(var $$, var y) = e;")); 34=> VerifyTrue(AddInsideMethod(@"(var x, var $$)")); 38=> VerifyTrue(AddInsideMethod(@"var ($$, y)")); 42=> VerifyTrue(AddInsideMethod(@"var ($$, y)")); 46=> VerifyTrue(AddInsideMethod(@"var ($$)")); 50=> VerifyTrue(AddInsideMethod(@"(var $$)")); 54=> VerifyTrue(AddInsideMethod(@"(var a, var $$)")); 58=> VerifyFalse(AddInsideMethod(@"var str = (($$)items) as string;")); 62=> VerifyTrue(AddInsideMethod(@"Func<int, int, int> f = (x, i $$")); 66=> VerifyTrue(AddInsideMethod(@"var (($$), y)")); 70=> VerifyTrue(AddInsideMethod(@"var ((x, $$), y)")); 74=> VerifyTrue(AddInsideMethod(@"var ((x, $$), y) = e;")); 78=> VerifyTrue(AddInsideMethod(@"foreach(var ($$")); 82=> VerifyTrue(AddInsideMethod(@"foreach(var ($$)")); 86=> VerifyTrue(AddInsideMethod(@"foreach(var ($$))")); 90=> VerifyTrue(AddInsideMethod(@"foreach(var (x, $$")); 94=> VerifyTrue(AddInsideMethod(@"foreach(var ($$) in ")); 98=> VerifyTrue(AddInsideMethod(@"foreach(var (($$), y)")); 102=> VerifyTrue(AddInsideMethod(@"foreach(var (($$), y) in ")); 106=> VerifyTrue(AddInsideMethod(@"foreach(var ((x, $$), y)")); 110=> VerifyTrue(AddInsideMethod(@"foreach(var ((x, $$), y) in ")); 114=> VerifyFalse(AddInsideMethod(@"var $$")); 118=> VerifyFalse(AddInsideMethod(@"if (1 is int i $$")); 122=> VerifyFalse(AddInsideMethod(@"if (1 is int i $$);")); 126=> VerifyFalse(AddInsideMethod(@"switch (1) { case int i $$ }"));
Extensions\ContextQuery\NamespaceContextTests.cs (58)
66=> VerifyFalse(AddInsideMethod("string s = \"$$")); 70=> VerifyFalse(AddInsideMethod("string s = \"$$\";")); 74=> VerifyFalse(AddInsideMethod("char c = '$$")); 174=> VerifyTrue(AddInsideMethod(@"var t = $$)c")); 186=> VerifyTrue(AddInsideMethod(@"var t = ($$)c")); 190=> VerifyTrue(AddInsideMethod(@"var t = new $$")); 194=> VerifyTrue(AddInsideMethod(@"var t = new $$ [")); 198=> VerifyTrue(AddInsideMethod(@"var t = stackalloc $$")); 202=> VerifyTrue(AddInsideMethod(@"var t = from $$ c")); 206=> VerifyTrue(AddInsideMethod(@"var t = from c in C join $$ j")); 210=> VerifyTrue(AddInsideMethod(@"$$ i =")); 214=> VerifyTrue(AddInsideMethod(@"fixed($$")); 218=> VerifyTrue(AddInsideMethod(@"foreach($$")); 222=> VerifyFalse(AddInsideMethod(@"foreach $$")); 226=> VerifyTrue(AddInsideMethod(@"try {} catch($$")); 356=> VerifyTrue(AddInsideMethod(@"($$")); 360=> VerifyTrue(AddInsideMethod(@"$$(")); 364=> VerifyTrue(AddInsideMethod(@"$$[")); 368=> VerifyTrue(AddInsideMethod(@"i[$$")); 372=> VerifyTrue(AddInsideMethod(@"(c)$$")); 376=> VerifyTrue(AddInsideMethod(@"var t = from c in $$")); 380=> VerifyTrue(AddInsideMethod(@"var t = from c in C let n = $$")); 384=> VerifyTrue(AddInsideMethod(@"var t = from c in C orderby $$")); 388=> VerifyTrue(AddInsideMethod(@"var t = from c in C select $$")); 392=> VerifyTrue(AddInsideMethod(@"$$")); 396=> VerifyTrue(AddInsideMethod(@"return $$")); 400=> VerifyTrue(AddInsideMethod(@"throw $$")); 404=> VerifyTrue(AddInsideMethod(@"yield return $$")); 408=> VerifyTrue(AddInsideMethod(@"foreach(T t in $$")); 412=> VerifyTrue(AddInsideMethod(@"using($$")); 416=> VerifyTrue(AddInsideMethod(@"lock($$")); 420=> VerifyTrue(AddInsideMethod(@"var i = $$")); 424=> VerifyTrue(AddInsideMethod(@"for($$")); 428=> VerifyTrue(AddInsideMethod(@"for(i=0;$$")); 432=> VerifyTrue(AddInsideMethod(@"for(i=0;i>10;$$")); 436=> VerifyTrue(AddInsideMethod(@"do {} while($$")); 440=> VerifyTrue(AddInsideMethod(@"while($$")); 444=> VerifyTrue(AddInsideMethod(@"int [$$")); 448=> VerifyTrue(AddInsideMethod(@"+$$")); 452=> VerifyTrue(AddInsideMethod(@"$$++")); 456=> VerifyTrue(AddInsideMethod(@"$$ + 1")); 460=> VerifyTrue(AddInsideMethod(@"1 + $$")); 464=> VerifyTrue(AddInsideMethod(@"$$ = 1")); 468=> VerifyTrue(AddInsideMethod(@"1 = $$")); 472=> VerifyTrue(AddInsideMethod(@"$$? 1:")); 476=> VerifyTrue(AddInsideMethod(@"true? $$:")); 480=> VerifyTrue(AddInsideMethod(@"true? 1:$$")); 484=> VerifyTrue(AddInsideMethod(@"var t = from c in C join p in $$")); 488=> VerifyTrue(AddInsideMethod(@"var t = from c in C join p in P on $$")); 492=> VerifyTrue(AddInsideMethod(@"var t = from c in C join p in P on id equals $$")); 496=> VerifyTrue(AddInsideMethod(@"var t = from c in C where $$")); 500=> VerifyTrue(AddInsideMethod(@"var t = from c in C group $$")); 504=> VerifyTrue(AddInsideMethod(@"var t = from c in C group g by $$")); 508=> VerifyTrue(AddInsideMethod(@"if ($$")); 512=> VerifyTrue(AddInsideMethod(@"switch($$")); 517VerifyTrue(AddInsideMethod(""" 526=> VerifyTrue(AddInsideMethod(@"var t = new [] { $$")); 554=> VerifyTrue(AddInsideMethod(@"global::$$"));
Extensions\ContextQuery\PossibleTupleContextTests.cs (6)
30VerifyTrue(AddInsideMethod(x)); 75=> VerifyTrue(AddInsideMethod(@"(var $$)")); 79=> VerifyTrue(AddInsideMethod(@"(var a, var $$)")); 83=> VerifyTrue(AddInsideMethod(@"var str = (($$)items) as string;")); 91=> VerifyFalse(AddInsideMethod(@"(int) $$")); 95=> VerifyFalse(AddInsideMethod(@"(Goo()) $$"));
Extensions\ContextQuery\TypeContextTests.cs (58)
66=> VerifyFalse(AddInsideMethod("string s = \"$$")); 70=> VerifyFalse(AddInsideMethod("string s = \"$$\";")); 74=> VerifyFalse(AddInsideMethod("char c = '$$")); 170=> VerifyTrue(AddInsideMethod(@"var t = $$)c")); 182=> VerifyTrue(AddInsideMethod(@"var t = ($$)c")); 186=> VerifyTrue(AddInsideMethod(@"var t = new $$")); 190=> VerifyTrue(AddInsideMethod(@"var t = new $$ [")); 194=> VerifyTrue(AddInsideMethod(@"var t = stackalloc $$")); 198=> VerifyTrue(AddInsideMethod(@"var t = from $$ c")); 202=> VerifyTrue(AddInsideMethod(@"var t = from c in C join $$ j")); 206=> VerifyTrue(AddInsideMethod(@"$$ i =")); 210=> VerifyTrue(AddInsideMethod(@"fixed($$")); 214=> VerifyTrue(AddInsideMethod(@"foreach($$")); 218=> VerifyFalse(AddInsideMethod(@"foreach $$")); 222=> VerifyTrue(AddInsideMethod(@"try {} catch($$")); 352=> VerifyTrue(AddInsideMethod(@"($$")); 356=> VerifyTrue(AddInsideMethod(@"$$(")); 360=> VerifyTrue(AddInsideMethod(@"$$[")); 364=> VerifyTrue(AddInsideMethod(@"i[$$")); 368=> VerifyTrue(AddInsideMethod(@"(c)$$")); 372=> VerifyTrue(AddInsideMethod(@"var t = from c in $$")); 376=> VerifyTrue(AddInsideMethod(@"var t = from c in C let n = $$")); 380=> VerifyTrue(AddInsideMethod(@"var t = from c in C orderby $$")); 384=> VerifyTrue(AddInsideMethod(@"var t = from c in C select $$")); 388=> VerifyTrue(AddInsideMethod(@"$$")); 392=> VerifyTrue(AddInsideMethod(@"return $$")); 396=> VerifyTrue(AddInsideMethod(@"throw $$")); 400=> VerifyTrue(AddInsideMethod(@"yield return $$")); 404=> VerifyTrue(AddInsideMethod(@"foreach(T t in $$")); 408=> VerifyTrue(AddInsideMethod(@"using($$")); 412=> VerifyTrue(AddInsideMethod(@"lock($$")); 416=> VerifyTrue(AddInsideMethod(@"var i = $$")); 420=> VerifyTrue(AddInsideMethod(@"for($$")); 424=> VerifyTrue(AddInsideMethod(@"for(i=0;$$")); 428=> VerifyTrue(AddInsideMethod(@"for(i=0;i>10;$$")); 432=> VerifyTrue(AddInsideMethod(@"do {} while($$")); 436=> VerifyTrue(AddInsideMethod(@"while($$")); 440=> VerifyTrue(AddInsideMethod(@"int [$$")); 444=> VerifyTrue(AddInsideMethod(@"+$$")); 448=> VerifyTrue(AddInsideMethod(@"$$++")); 452=> VerifyTrue(AddInsideMethod(@"$$ + 1")); 456=> VerifyTrue(AddInsideMethod(@"1 + $$")); 460=> VerifyTrue(AddInsideMethod(@"$$ = 1")); 464=> VerifyTrue(AddInsideMethod(@"1 = $$")); 468=> VerifyTrue(AddInsideMethod(@"$$? 1:")); 472=> VerifyTrue(AddInsideMethod(@"true? $$:")); 476=> VerifyTrue(AddInsideMethod(@"true? 1:$$")); 480=> VerifyTrue(AddInsideMethod(@"var t = from c in C join p in $$")); 484=> VerifyTrue(AddInsideMethod(@"var t = from c in C join p in P on $$")); 488=> VerifyTrue(AddInsideMethod(@"var t = from c in C join p in P on id equals $$")); 492=> VerifyTrue(AddInsideMethod(@"var t = from c in C where $$")); 496=> VerifyTrue(AddInsideMethod(@"var t = from c in C group $$")); 500=> VerifyTrue(AddInsideMethod(@"var t = from c in C group g by $$")); 504=> VerifyTrue(AddInsideMethod(@"if ($$")); 508=> VerifyTrue(AddInsideMethod(@"switch($$")); 513VerifyTrue(AddInsideMethod(""" 522=> VerifyTrue(AddInsideMethod(@"var t = new [] { $$")); 550=> VerifyFalse(AddInsideMethod(@"global::$$"));