Attributes\AttributeTests_WellKnownAttributes.cs (186)
10504Assert.True(comp.HasLocalsInit("C.M_init", realIL: true));
10505Assert.False(comp.HasLocalsInit("C.M_skip", realIL: true));
10506Assert.True(comp.HasLocalsInit("C.M_init", realIL: false));
10507Assert.False(comp.HasLocalsInit("C.M_skip", realIL: false));
10539Assert.False(comp.HasLocalsInit("C.M"));
10572Assert.False(comp.HasLocalsInit("C.M"));
10605Assert.False(comp.HasLocalsInit("C.M"));
10633Assert.Null(verifier.HasLocalsInit("C.M1")); // no locals
10634Assert.False(verifier.HasLocalsInit("C.M1", realIL: true));
10635Assert.Null(verifier.HasLocalsInit("C.M2")); // no locals
10636Assert.True(verifier.HasLocalsInit("C.M2", realIL: true));
10637Assert.Null(verifier.HasLocalsInit("C.M3")); // no locals
10638Assert.False(verifier.HasLocalsInit("C.M3", realIL: true));
10792Assert.True(comp.HasLocalsInit("C.M"));
10822Assert.False(comp.HasLocalsInit("C.<M>g__F|0_0"));
10852Assert.False(comp.HasLocalsInit("C.<>c.<M>b__0_0"));
10912Assert.False(comp.HasLocalsInit("C.<M>g__F|0_0")); // F
10913Assert.False(comp.HasLocalsInit("C.<M>g__FF|0_2")); // FF
10914Assert.False(comp.HasLocalsInit("C.<>c.<M>b__0_3")); // FL
10915Assert.False(comp.HasLocalsInit("C.<>c.<M>b__0_1")); // L
10916Assert.False(comp.HasLocalsInit("C.<M>g__LF|0_4")); // LF
10917Assert.False(comp.HasLocalsInit("C.<>c.<M>b__0_5")); // LL
10956Assert.True(verifier.HasLocalsInit("C.M"));
10957Assert.True(verifier.HasLocalsInit("C.<M>g__localNoAttribute|0_0")); // localNoAttribute
10958Assert.True(verifier.HasLocalsInit("C.<>c.<M>b__0_1")); // lambda
10959Assert.False(verifier.HasLocalsInit("C.<M>g__localWithAttribute|0_2")); // localWithAttribute
10998Assert.True(verifier.HasLocalsInit("C.M"));
10999Assert.True(verifier.HasLocalsInit("C.<M>g__localNoAttribute|0_0")); // localNoAttribute
11000Assert.False(verifier.HasLocalsInit("C.<M>g__localWithAttribute|0_1")); // localWithAttribute
11001Assert.False(verifier.HasLocalsInit("C.<>c.<M>b__0_2")); // lambda
11040Assert.True(verifier.HasLocalsInit("C.M"));
11041Assert.False(verifier.HasLocalsInit("C.<M>g__localWithAttribute|0_0")); // localWithAttribute
11042Assert.False(verifier.HasLocalsInit("C.<M>g__localNoAttribute|0_1")); // localNoAttribute
11043Assert.False(verifier.HasLocalsInit("C.<>c.<M>b__0_2")); // lambda
11082Assert.True(verifier.HasLocalsInit("C.M"));
11083Assert.True(verifier.HasLocalsInit("C.<>c.<M>b__0_0")); // lambda
11084Assert.True(verifier.HasLocalsInit("C.<M>g__localNoAttribute|0_1")); // localNoAttribute
11085Assert.False(verifier.HasLocalsInit("C.<M>g__localWithAttribute|0_2")); // localWithAttribute
11124Assert.True(verifier.HasLocalsInit("C.M"));
11125Assert.True(verifier.HasLocalsInit("C.<>c.<M>b__0_0")); // lambda
11126Assert.False(verifier.HasLocalsInit("C.<M>g__localWithAttribute|0_1")); // localWithAttribute
11127Assert.False(verifier.HasLocalsInit("C.<M>g__localNoAttribute|0_2")); // localNoAttribute
11166Assert.True(verifier.HasLocalsInit("C.M"));
11167Assert.False(verifier.HasLocalsInit("C.<M>g__localWithAttribute|0_0")); // localWithAttribute
11168Assert.False(verifier.HasLocalsInit("C.<>c.<M>b__0_1")); // lambda
11169Assert.False(verifier.HasLocalsInit("C.<M>g__localNoAttribute|0_2")); // localNoAttribute
11218Assert.False(verifier.HasLocalsInit("C.PropWithAttribute.get"));
11219Assert.False(verifier.HasLocalsInit("C.<get_PropWithAttribute>g__local1|1_0"));
11220Assert.True(verifier.HasLocalsInit("C.PropNoAttribute.get"));
11221Assert.True(verifier.HasLocalsInit("C.<get_PropNoAttribute>g__local1|3_0"));
11259Assert.False(verifier.HasLocalsInit("C.PropWithAttribute.get"));
11260Assert.False(verifier.HasLocalsInit("C.<get_PropWithAttribute>g__local1|1_0"));
11308Assert.False(verifier.HasLocalsInit("C.EventWithAttribute.add"));
11309Assert.False(verifier.HasLocalsInit("C.<add_EventWithAttribute>g__local1|1_0"));
11310Assert.True(verifier.HasLocalsInit("C.EventNoAttribute.add"));
11311Assert.True(verifier.HasLocalsInit("C.<add_EventNoAttribute>g__local1|4_0"));
11338Assert.False(verifier.HasLocalsInit("C.M"));
11339Assert.False(verifier.HasLocalsInit("C.<M>g__local|0_0"));
11367Assert.False(verifier.HasLocalsInit("C.M"));
11368Assert.False(verifier.HasLocalsInit("C.<M>g__local|0_0"));
11393Assert.Equal(expectedAreLocalsZeroed, verifier.HasLocalsInit("Program.<>c.<Main>b__0_0()"));
11418Assert.Equal(expectedAreLocalsZeroed, verifier.HasLocalsInit("Program.<>c.<.ctor>b__1_0()"));
11449Assert.Equal(expectedAreLocalsZeroed, verifier.HasLocalsInit("Program.<>c.<.ctor>b__1_0()"));
11480Assert.False(verifier.HasLocalsInit("<top-level-statements-entry-point>"));
11481Assert.False(verifier.HasLocalsInit("Program.<<Main>$>g__local|0_0"));
11499Assert.True(verifier.HasLocalsInit("<top-level-statements-entry-point>"));
11500Assert.True(verifier.HasLocalsInit("Program.<<Main>$>g__local|0_0"));
11539Assert.False(comp.HasLocalsInit("C.M1"));
11540Assert.Null(comp.HasLocalsInit("D.<>n__0")); // Base method wrapper for C.M1
11579Assert.False(comp1.HasLocalsInit("C.M1"));
11583Assert.Null(comp2.HasLocalsInit("D.<>n__0")); // Base method wrapper for C.M1
11616Assert.False(comp.HasLocalsInit("C.<M_skip>d__0.System.Collections.IEnumerator.MoveNext"));
11617Assert.True(comp.HasLocalsInit("C.<M_init>d__1.System.Collections.IEnumerator.MoveNext"));
11618Assert.False(comp.HasLocalsInit("C.<M_skip>d__0.System.Collections.Generic.IEnumerable<object>.GetEnumerator"));
11619Assert.True(comp.HasLocalsInit("C.<M_init>d__1.System.Collections.Generic.IEnumerable<object>.GetEnumerator"));
11623Assert.Null(comp.HasLocalsInit("C.<M_skip>d__0.System.IDisposable.Dispose"));
11624Assert.Null(comp.HasLocalsInit("C.<M_init>d__1.System.IDisposable.Dispose"));
11625Assert.Null(comp.HasLocalsInit("C.<M_skip>d__0.System.Collections.IEnumerable.GetEnumerator"));
11626Assert.Null(comp.HasLocalsInit("C.<M_init>d__1.System.Collections.IEnumerable.GetEnumerator"));
11627Assert.Null(comp.HasLocalsInit("C.<M_skip>d__0.System.Collections.IEnumerator.get_Current"));
11628Assert.Null(comp.HasLocalsInit("C.<M_init>d__1.System.Collections.IEnumerator.get_Current"));
11629Assert.Null(comp.HasLocalsInit("C.<M_skip>d__0.System.Collections.IEnumerator.Reset"));
11630Assert.Null(comp.HasLocalsInit("C.<M_init>d__1.System.Collections.IEnumerator.Reset"));
11631Assert.Null(comp.HasLocalsInit("C.<M_skip>d__0.System.Collections.Generic.IEnumerator<object>.get_Current"));
11632Assert.Null(comp.HasLocalsInit("C.<M_init>d__1.System.Collections.Generic.IEnumerator<object>.get_Current"));
11633Assert.Null(comp.HasLocalsInit("C.<M_skip>d__0..ctor"));
11634Assert.Null(comp.HasLocalsInit("C.<M_init>d__1..ctor"));
11664Assert.False(comp.HasLocalsInit("C.<<M>g__F|0_0>d.System.Collections.IEnumerator.MoveNext"));
11665Assert.False(comp.HasLocalsInit("C.<<M>g__F|0_0>d.System.Collections.Generic.IEnumerable<object>.GetEnumerator"));
11698Assert.False(comp.HasLocalsInit("C.<M_skip>d__0.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext"));
11699Assert.True(comp.HasLocalsInit("C.<M_init>d__1.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext"));
11703Assert.Null(comp.HasLocalsInit("C.<M_skip>d__0.System.Runtime.CompilerServices.IAsyncStateMachine.SetStateMachine"));
11704Assert.Null(comp.HasLocalsInit("C.<M_init>d__1.System.Runtime.CompilerServices.IAsyncStateMachine.SetStateMachine"));
11735Assert.False(comp.HasLocalsInit("C.<<M>g__F|0_0>d.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext"));
11766Assert.False(comp.HasLocalsInit("C.<>c.<<M>b__0_0>d.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext"));
11812Assert.Null(comp_init.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>.GetHashCode"));
11813Assert.Null(comp_init.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>..ctor"));
11814Assert.True(comp_init.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>.Equals"));
11815Assert.True(comp_init.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>.ToString"));
11816Assert.Null(comp_init.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>.Value.get"));
11818Assert.Null(comp_skip.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>.GetHashCode"));
11819Assert.Null(comp_skip.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>..ctor"));
11820Assert.False(comp_skip.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>.Equals"));
11821Assert.False(comp_skip.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>.ToString"));
11822Assert.Null(comp_skip.HasLocalsInit("<>f__AnonymousType0<<Value>j__TPar>.Value.get"));
11849Assert.Null(comp.HasLocalsInit("C.<>c__DisplayClass0_0..ctor"));
11893Assert.Null(comp_init.HasLocalsInit("Microsoft.CodeAnalysis.EmbeddedAttribute..ctor"));
11894Assert.Null(comp_init.HasLocalsInit("System.Runtime.CompilerServices.IsReadOnlyAttribute..ctor"));
11896Assert.Null(comp_skip.HasLocalsInit("Microsoft.CodeAnalysis.EmbeddedAttribute..ctor"));
11897Assert.Null(comp_skip.HasLocalsInit("System.Runtime.CompilerServices.IsReadOnlyAttribute..ctor"));
11935Assert.True(comp.HasLocalsInit("C_init.M"));
11936Assert.False(comp.HasLocalsInit("C_skip.M"));
11987Assert.False(comp.HasLocalsInit("C.P_skip.get"));
11988Assert.True(comp.HasLocalsInit("C.P_init.get"));
11989Assert.False(comp.HasLocalsInit("C.P_skip.set"));
11990Assert.True(comp.HasLocalsInit("C.P_init.set"));
12059Assert.False(comp.HasLocalsInit("C.P1.get"));
12060Assert.True(comp.HasLocalsInit("C.P1.set"));
12061Assert.True(comp.HasLocalsInit("C.P2.get"));
12062Assert.False(comp.HasLocalsInit("C.P2.set"));
12063Assert.False(comp.HasLocalsInit("C.P3.get"));
12064Assert.False(comp.HasLocalsInit("C.P3.set"));
12094Assert.False(comp.HasLocalsInit("C.<get_P>d__1.System.Collections.IEnumerator.MoveNext"));
12095Assert.False(comp.HasLocalsInit("C.<get_P>d__1.System.Collections.Generic.IEnumerable<object>.GetEnumerator"));
12167Assert.False(comp.HasLocalsInit("C.P1.get"));
12168Assert.False(comp.HasLocalsInit("C.P1.set"));
12169Assert.False(comp.HasLocalsInit("C.P2.get"));
12170Assert.False(comp.HasLocalsInit("C.P2.set"));
12171Assert.False(comp.HasLocalsInit("C.P3.get"));
12172Assert.False(comp.HasLocalsInit("C.P3.set"));
12228Assert.True(comp.HasLocalsInit("C_init.P.get"));
12229Assert.False(comp.HasLocalsInit("C_skip.P.get"));
12230Assert.True(comp.HasLocalsInit("C_init.P.set"));
12231Assert.False(comp.HasLocalsInit("C_skip.P.set"));
12259Assert.Null(comp.HasLocalsInit("C.P.get"));
12260Assert.Null(comp.HasLocalsInit("C.P.set"));
12305Assert.Null(comp.HasLocalsInit("C.P.get"));
12306Assert.Null(comp.HasLocalsInit("C.P.set"));
12307Assert.Null(comp.HasLocalsInit("C.P2.get"));
12308Assert.Null(comp.HasLocalsInit("C.P2.set"));
12309Assert.Null(comp.HasLocalsInit("C.P3.get"));
12421Assert.True(comp.HasLocalsInit("C_init.P.get"));
12422Assert.False(comp.HasLocalsInit("C_skip.P.get"));
12423Assert.True(comp.HasLocalsInit("C_init.P.set"));
12424Assert.False(comp.HasLocalsInit("C_skip.P.set"));
12425Assert.True(comp.HasLocalsInit("C_init.M"));
12426Assert.False(comp.HasLocalsInit("C_skip.M"));
12427Assert.True(comp.HasLocalsInit("C_init.C2.M2"));
12428Assert.False(comp.HasLocalsInit("C_skip.C2.M2"));
12429Assert.True(comp.HasLocalsInit("C_init.E.add"));
12430Assert.True(comp.HasLocalsInit("C_init.E.remove"));
12431Assert.False(comp.HasLocalsInit("C_skip.E.add"));
12432Assert.False(comp.HasLocalsInit("C_skip.E.remove"));
12471Assert.False(comp.HasLocalsInit("C.C2.M2"));
12472Assert.False(comp.HasLocalsInit("C.C2.C3.M3"));
12526Assert.False(comp.HasLocalsInit("C.C2.P2.get"));
12527Assert.False(comp.HasLocalsInit("C.C2.P2.set"));
12528Assert.False(comp.HasLocalsInit("C.C2.M2"));
12529Assert.False(comp.HasLocalsInit("C.C2.C3.M3"));
12584Assert.False(comp.HasLocalsInit("C.P.get"));
12585Assert.False(comp.HasLocalsInit("C.P.set"));
12586Assert.False(comp.HasLocalsInit("C.M"));
12587Assert.False(comp.HasLocalsInit("C.C2.M2"));
12631Assert.True(comp.HasLocalsInit("C_init.C.M"));
12632Assert.False(comp.HasLocalsInit("C_skip.C.M"));
12660Assert.False(comp.HasLocalsInit("C.M"));
12688Assert.False(comp.HasLocalsInit("C.Main"));
12716Assert.False(comp.HasLocalsInit("C.M"));
12747Assert.True(comp.HasLocalsInit("C.M"));
12815Assert.False(verifier.HasLocalsInit("I.M"));
12816Assert.False(verifier.HasLocalsInit("I.C2.M2"));
12817Assert.False(verifier.HasLocalsInit("I.P.get"));
12818Assert.False(verifier.HasLocalsInit("I.P.set"));
12921Assert.False(verifier.HasLocalsInit("A.M1"));
12923Assert.True(verifier.HasLocalsInit("B.M2"));
12940Assert.False(verifier.HasLocalsInit("C.Finalize"));
12959Assert.False(verifier.HasLocalsInit("C..ctor"));
12995Assert.False(verifier.HasLocalsInit("ClassWithAttributeWithLocal..ctor"));
12996Assert.True(verifier.HasLocalsInit("ClassNoAttributeWithLocal..ctor"));
12997Assert.Null(verifier.HasLocalsInit("ClassWithAttributeNoLocal..ctor"));
12998Assert.Null(verifier.HasLocalsInit("ClassNoAttributeNoLocal..ctor"));
13041Assert.Equal(hasLocalsInit, verifier.HasLocalsInit("C.<>c.<.ctor>b__0_0")); // action
13042Assert.Equal(hasLocalsInit, verifier.HasLocalsInit("C.<.ctor>g__local|0_1")); // local
13087Assert.Equal(hasLocalsInit, verifier.HasLocalsInit("C.<>c.<.ctor>b__0_0")); // lambda
13088Assert.Equal(hasLocalsInit, verifier.HasLocalsInit("C.<.ctor>g__local|0_1")); // local
13115Assert.False(verifier.HasLocalsInit("C.M"));