248 references to VerifyValue
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (177)
Attributes\AttributeTests.cs (147)
491attrs[0].VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.UnitTests"); 493attrs[1].VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp"); 495attrs[2].VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp.UnitTests"); 497attrs[3].VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.CSharp.Test.Utilities"); 499attrs[4].VerifyValue(0, TypedConstantKind.Primitive, "Roslyn.Compilers.VisualBasic"); 1397a.VerifyValue(0, TypedConstantKind.Enum, (int)System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5); 1401a.VerifyValue(0, TypedConstantKind.Primitive, ""); 1405a.VerifyValue(0, TypedConstantKind.Primitive, true); 1409a.VerifyValue(0, TypedConstantKind.Enum, (int)AssemblyNameFlags.Retargetable); 1413a.VerifyValue(0, TypedConstantKind.Primitive, "MyKey.snk"); 1417a.VerifyValue(0, TypedConstantKind.Primitive, "Key Name"); 1421a.VerifyValue(0, TypedConstantKind.Primitive, "1.2.*"); 1425a.VerifyValue(0, TypedConstantKind.Primitive, "4.3.2.100"); 1482attrs.First().VerifyValue<object>(0, TypedConstantKind.Primitive, null); 1568attrs.First().VerifyValue(0, TypedConstantKind.Primitive, true); 1672attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeof(object)); 1678attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { typeof(string) }); 1683attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { 1, "two", typeof(string), 3.1415926 }); 1686attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { new object[] { typeof(string) } }); 3077attrs[0].VerifyValue(0, TypedConstantKind.Enum, (int)FileMode.Open); 3078attrs[0].VerifyValue(1, TypedConstantKind.Enum, (int)(BindingFlags.DeclaredOnly | BindingFlags.Public)); 3084attrs[0].VerifyValue(0, TypedConstantKind.Array, new char[] { 'q', 'c' }); 3093attrs[0].VerifyValue<object>(0, TypedConstantKind.Primitive, null); 3094attrs[0].VerifyValue<long>(1, TypedConstantKind.Primitive, 256); 3095attrs[0].VerifyValue<float>(2, TypedConstantKind.Primitive, 0); 3096attrs[0].VerifyValue<short>(3, TypedConstantKind.Primitive, -1); 3099attrs[1].VerifyValue<object>(0, TypedConstantKind.Type, typeof(Dictionary<string, int>)); 3100attrs[1].VerifyValue<long>(1, TypedConstantKind.Primitive, 265); 3101attrs[1].VerifyValue<float>(2, TypedConstantKind.Primitive, -0.0001f); 3102attrs[1].VerifyValue<short>(3, TypedConstantKind.Primitive, 2); 3139attrs.First().VerifyValue<object>(0, TypedConstantKind.Array, new object[] { 0, "", null }); 3140attrs.First().VerifyValue<byte>(1, TypedConstantKind.Primitive, 255); 3141attrs.First().VerifyValue<sbyte>(2, TypedConstantKind.Primitive, -128); 3148attrs[0].VerifyValue<object>(0, TypedConstantKind.Type, typeof(string[,,])); 3181attrs.First().VerifyValue<object>(0, TypedConstantKind.Array, new object[] { 1, null, "Hi" }); 3413attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3414attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "" }); 3424attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3425attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "" }); 3493attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "MultipleArgumentsToParamsParameter"); 3494attr.VerifyValue<int[]>(1, TypedConstantKind.Array, new int[] { 4, 5, 6 }); 3500attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "NoArgumentsToParamsParameter"); 3501attr.VerifyValue<int[]>(1, TypedConstantKind.Array, new int[] { }); 3507attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "NullArgumentToParamsParameter"); 3508attr.VerifyValue<int[]>(1, TypedConstantKind.Array, null); 3550attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3551attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "whatever" }); 3561attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3562attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "whatever" }); 3597attrs.First().VerifyValue(0, TypedConstantKind.Type, typeof(Object)); 3642attrs.First().VerifyValue(0, TypedConstantKind.Array, (object[])null); 4044attr.VerifyValue(0, TypedConstantKind.Enum, (int)(AttributeTargets.Field | AttributeTargets.Event)); 4098attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 4); 4099attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 5); 4141attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 3); 4142attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 4); 4143attrs.First().VerifyValue(2, TypedConstantKind.Primitive, 5); 4187attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2); 4188attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 1); 4230attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 3); 4231attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 4); 4232attrs.First().VerifyValue(2, TypedConstantKind.Primitive, 5); 4276attr.VerifyValue<int>(0, TypedConstantKind.Primitive, 2); 4479attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2); 4485attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2); 4534attrs.First().VerifyValue(0, TypedConstantKind.Type, cClass.AsUnboundGenericType()); 4574attrs.First().VerifyValue(0, TypedConstantKind.Type, bClass.AsUnboundGenericType()); 4957attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 4963attr.VerifyValue<int>(0, TypedConstantKind.Primitive, 1); 5018attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5022attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5030attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5034attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5197attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5202attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5208attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5215attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5224attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5231attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5320attributes[0].VerifyValue(0, TypedConstantKind.Primitive, value); 9115attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9116attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9117attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9120attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9121attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9122attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9126attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9127attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9128attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9196attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9197attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9198attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9202attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9203attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9204attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9209attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9210attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9211attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9214attrs4[0].VerifyValue(0, TypedConstantKind.Array, new object[] { "A" }); 9215attrs4[1].VerifyValue(0, TypedConstantKind.Primitive, "A"); 9216attrs4[2].VerifyValue(0, TypedConstantKind.Primitive, "A"); 9280attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9281attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9282attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9285attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9286attrs2[1].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9287attrs2[2].VerifyValue(0, TypedConstantKind.Array, (string[])null); 9291attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9292attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9296attrs4[0].VerifyValue(0, TypedConstantKind.Array, value4); 9297attrs4[1].VerifyValue(0, TypedConstantKind.Array, value4); 9298attrs4[2].VerifyValue(0, TypedConstantKind.Array, value4); 9353attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9354attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9357attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9358attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9359attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9363attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9364attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9365attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9427attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9428attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9432attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9433attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9434attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9439attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9440attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9441attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9444attrs4[0].VerifyValue(0, TypedConstantKind.Array, new object[] { 1 }); 9445attrs4[1].VerifyValue(0, TypedConstantKind.Primitive, 1); 9446attrs4[2].VerifyValue(0, TypedConstantKind.Primitive, 1); 9507attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9508attrs1[1].VerifyValue(0, TypedConstantKind.Array, new object[] { value1 }); 9509attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9513attrs2[0].VerifyValue(0, TypedConstantKind.Array, value2); 9514attrs2[1].VerifyValue(0, TypedConstantKind.Array, value2); 9518attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9519attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9523attrs4[0].VerifyValue(0, TypedConstantKind.Array, value4); 9524attrs4[1].VerifyValue(0, TypedConstantKind.Array, value4); 9525attrs4[2].VerifyValue(0, TypedConstantKind.Array, value4); 9577attrs[0].VerifyValue(0, TypedConstantKind.Array, nullArray); 9579attrs[1].VerifyValue(0, TypedConstantKind.Array, emptyArray); 9581attrs[2].VerifyValue(0, TypedConstantKind.Array, nullArray); 9584attrs[3].VerifyValue(0, TypedConstantKind.Array, emptyArray); 9587attrs[4].VerifyValue(0, TypedConstantKind.Array, nullArray); 9590attrs[5].VerifyValue(0, TypedConstantKind.Array, emptyArray);
Attributes\AttributeTests_Synthesized.cs (2)
70attribute.VerifyValue(0, TypedConstantKind.Primitive, expectedArgValue); 108attribute.VerifyValue(0, TypedConstantKind.Enum, (int)expectedDebuggingMode);
Attributes\AttributeTests_WellKnownAttributes.cs (28)
140attrSym.VerifyValue(0, TypedConstantKind.Primitive, 1); 164attrSym.VerifyValue(0, TypedConstantKind.Primitive, "ABCDEF5D-2448-447A-B786-64682CBEF123"); 167attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)ComInterfaceType.InterfaceIsIUnknown); 170attrSym.VerifyValue(0, TypedConstantKind.Type, typeof(object)); 173attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)TypeLibTypeFlags.FAggregatable); 176attrSym.VerifyValue(0, TypedConstantKind.Primitive, false); 266attrSym.VerifyValue(0, TypedConstantKind.Primitive, false); 269attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)CallingConvention.StdCall); 282attrSym.VerifyValue(0, TypedConstantKind.Type, typeof(object)); 285attrSym.VerifyValue(0, TypedConstantKind.Primitive, "ProgId"); 289attrSym.VerifyValue(0, TypedConstantKind.Primitive, 123); 292attrSym.VerifyValue(0, TypedConstantKind.Primitive, 1); 306attrSym.VerifyValue(0, TypedConstantKind.Primitive, true); 309attrSym.VerifyValue(1, TypedConstantKind.Primitive, "EGoo, InteropAttribute, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); 317attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)TypeLibVarFlags.FDisplayBind); 321attrSym.VerifyValue(0, TypedConstantKind.Primitive, "message"); 322attrSym.VerifyValue(1, TypedConstantKind.Primitive, false); 416attrSym.VerifyValue(0, TypedConstantKind.Primitive, 99uL); 424attrSym.VerifyValue(0, TypedConstantKind.Primitive, "Ref"); 435attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0f); 455attrSym.VerifyValue(2, TypedConstantKind.Primitive, 100); 469attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)LayoutKind.Explicit); 480attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)UnmanagedType.I8); 482attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0); 2399attrSym.VerifyValue(0, TypedConstantKind.Primitive, "unmanaged.dll"); 2407attrSym.VerifyValue(0, TypedConstantKind.Primitive, "user32.dll"); 5067attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)AttributeTargets.Class); 5073attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)AttributeTargets.Class);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (71)
Symbols\Metadata\PE\LoadingAttributes.cs (70)
61aBoolInst.VerifyValue(0, TypedConstantKind.Primitive, true); 64aByteInst.VerifyValue(0, TypedConstantKind.Primitive, Convert.ToByte(1)); 67aCharInst.VerifyValue(0, TypedConstantKind.Primitive, 'a'); 70aSingleInst.VerifyValue(0, TypedConstantKind.Primitive, 3.14159f); 73aDoubleInst.VerifyValue(0, TypedConstantKind.Primitive, 3.1415926); 76aInt16Inst.VerifyValue(0, TypedConstantKind.Primitive, (Int16)16); 79aInt32Inst.VerifyValue(0, TypedConstantKind.Primitive, 32); 82aInt64Inst.VerifyValue(0, TypedConstantKind.Primitive, 64L); 85aObjectInst.VerifyValue(0, TypedConstantKind.Primitive, "object"); 88aStringInst.VerifyValue(0, TypedConstantKind.Primitive, "assembly"); 91aTypeInst.VerifyValue(0, TypedConstantKind.Type, typeof(string)); 133aBoolInst.VerifyValue(0, TypedConstantKind.Primitive, true); 136aByteInst.VerifyValue(0, TypedConstantKind.Primitive, Convert.ToByte(1)); 139aCharInst.VerifyValue(0, TypedConstantKind.Primitive, 'a'); 142aSingleInst.VerifyValue(0, TypedConstantKind.Primitive, 3.14159f); 145aDoubleInst.VerifyValue(0, TypedConstantKind.Primitive, 3.1415926); 148aInt16Inst.VerifyValue(0, TypedConstantKind.Primitive, (Int16)16); 151aInt32Inst.VerifyValue(0, TypedConstantKind.Primitive, 32); 154aInt64Inst.VerifyValue(0, TypedConstantKind.Primitive, 64L); 157aObjectInst.VerifyValue(0, TypedConstantKind.Primitive, "object"); 160aStringInst.VerifyValue(0, TypedConstantKind.Primitive, "module"); 163aTypeInst.VerifyValue(0, TypedConstantKind.Type, typeof(string)); 205c1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "C1"); 208innerC1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "InnerC1"); 215innerC2.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "InnerC2"); 218field1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "field1"); 221property1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "Property1"); 224sub1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "Sub1"); 227sub1P1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "p1"); 230function1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "Function1"); 385c1.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, "C1"); 432l.GetAttributes().First().VerifyValue(0, TypedConstantKind.Type, "System.Collections.Generic.List<>"); 435l.GetAttributes().First().VerifyValue(0, TypedConstantKind.Type, "System.Collections.Generic.List<C1>"); 438l.GetAttributes().First().VerifyValue(0, TypedConstantKind.Type, "System.Collections.Generic.List<System.String>"); 441l.GetAttributes().First().VerifyValue(0, TypedConstantKind.Type, "System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<C1, System.String>>"); 444l.GetAttributes().First().VerifyValue(0, TypedConstantKind.Type, "System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.String, C1.InnerC1<System.Int32>.InnerC2<System.String, System.String>>>"); 477arg.VerifyValue(0, TypedConstantKind.Array, new int[] { 1, 2 }); 481arg.VerifyValue(0, TypedConstantKind.Array, new object[] { stringType }); 485arg.VerifyValue(0, TypedConstantKind.Array, new object[] { stringType }); 489arg.VerifyValue(0, TypedConstantKind.Array, new object[] { stringType }); 493arg.VerifyValue(0, TypedConstantKind.Array, new object[] { new object[] { stringType } }); 499arg.VerifyValue(0, TypedConstantKind.Array, new object[] { 1, "two", stringType, 3.1415926 }); 505arg.VerifyValue(0, TypedConstantKind.Array, new object[] { 1, new object[] { 2, 3, 4 }, 5 }); 511arg.VerifyValue(0, TypedConstantKind.Array, new int[] { 1, 2, 3 }); 606a.VerifyValue(0, TypedConstantKind.Primitive, "InteropAttributes"); 609a.VerifyValue(1, TypedConstantKind.Primitive, 2); 612a.VerifyValue(0, TypedConstantKind.Primitive, "1234C65D-1234-447A-B786-64682CBEF136"); 615a.VerifyValue(0, TypedConstantKind.Primitive, false); 619a.VerifyValue(0, TypedConstantKind.Primitive, false); 630a.VerifyValue(2, TypedConstantKind.Primitive, 3); 637a.VerifyValue(0, TypedConstantKind.Primitive, true); 644a.VerifyValue(0, TypedConstantKind.Primitive, 8); 694attrSym.VerifyValue(0, TypedConstantKind.Primitive, "ABCDEF5D-2448-447A-B786-64682CBEF123"); 747attrSym.VerifyValue(0, TypedConstantKind.Primitive, false); 797attrSym.VerifyValue(0, TypedConstantKind.Primitive, "message"); 798attrSym.VerifyValue(1, TypedConstantKind.Primitive, false); 854attrSym.VerifyValue(0, TypedConstantKind.Type, cbar); 858attrSym.VerifyValue(0, TypedConstantKind.Primitive, "MyIndex"); 863mem.GetAttributes().First().VerifyValue(0, TypedConstantKind.Primitive, 10); 897attrSym.VerifyValue(0, TypedConstantKind.Primitive, 1); 968attrSym.VerifyValue(0, TypedConstantKind.Primitive, 3.1415926); 977attrSym.VerifyValue(0, TypedConstantKind.Primitive, 'q'); 978attrSym.VerifyValue(1, TypedConstantKind.Primitive, Convert.ToByte(2)); 990attrSym.VerifyValue(0, TypedConstantKind.Primitive, "555"); 1005attrSym.VerifyValue(0, TypedConstantKind.Array, new sbyte[] { -1, 0, 1 }); 1183attr1.VerifyValue(0, TypedConstantKind.Primitive, "4.0.30319.18408"); 1187attr1.VerifyValue(0, TypedConstantKind.Primitive, "4.0.30319.18408"); 1243attr.VerifyValue(0, TypedConstantKind.Primitive, "genericUriParserOptions"); 1276attr.VerifyValue(0, TypedConstantKind.Primitive, "DataCategory_Mapping"); 1279attr.VerifyValue(0, TypedConstantKind.Primitive, "DataAdapter_MissingMappingAction");
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
151attribute.VerifyValue(0, TypedConstantKind.Type, newMsCorLib_systemType);