248 references to VerifyValue
Microsoft.CodeAnalysis.CSharp.Emit3.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"); 1435a.VerifyValue(0, TypedConstantKind.Enum, (int)System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5); 1439a.VerifyValue(0, TypedConstantKind.Primitive, ""); 1443a.VerifyValue(0, TypedConstantKind.Primitive, true); 1447a.VerifyValue(0, TypedConstantKind.Enum, (int)AssemblyNameFlags.Retargetable); 1451a.VerifyValue(0, TypedConstantKind.Primitive, "MyKey.snk"); 1455a.VerifyValue(0, TypedConstantKind.Primitive, "Key Name"); 1459a.VerifyValue(0, TypedConstantKind.Primitive, "1.2.*"); 1463a.VerifyValue(0, TypedConstantKind.Primitive, "4.3.2.100"); 1520attrs.First().VerifyValue<object>(0, TypedConstantKind.Primitive, null); 1606attrs.First().VerifyValue(0, TypedConstantKind.Primitive, true); 1710attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeof(object)); 1716attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { typeof(string) }); 1721attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { 1, "two", typeof(string), 3.1415926 }); 1724attrs.First().VerifyValue(0, TypedConstantKind.Array, new object[] { new object[] { typeof(string) } }); 3115attrs[0].VerifyValue(0, TypedConstantKind.Enum, (int)FileMode.Open); 3116attrs[0].VerifyValue(1, TypedConstantKind.Enum, (int)(BindingFlags.DeclaredOnly | BindingFlags.Public)); 3122attrs[0].VerifyValue(0, TypedConstantKind.Array, new char[] { 'q', 'c' }); 3131attrs[0].VerifyValue<object>(0, TypedConstantKind.Primitive, null); 3132attrs[0].VerifyValue<long>(1, TypedConstantKind.Primitive, 256); 3133attrs[0].VerifyValue<float>(2, TypedConstantKind.Primitive, 0); 3134attrs[0].VerifyValue<short>(3, TypedConstantKind.Primitive, -1); 3137attrs[1].VerifyValue<object>(0, TypedConstantKind.Type, typeof(Dictionary<string, int>)); 3138attrs[1].VerifyValue<long>(1, TypedConstantKind.Primitive, 265); 3139attrs[1].VerifyValue<float>(2, TypedConstantKind.Primitive, -0.0001f); 3140attrs[1].VerifyValue<short>(3, TypedConstantKind.Primitive, 2); 3177attrs.First().VerifyValue<object>(0, TypedConstantKind.Array, new object[] { 0, "", null }); 3178attrs.First().VerifyValue<byte>(1, TypedConstantKind.Primitive, 255); 3179attrs.First().VerifyValue<sbyte>(2, TypedConstantKind.Primitive, -128); 3186attrs[0].VerifyValue<object>(0, TypedConstantKind.Type, typeof(string[,,])); 3219attrs.First().VerifyValue<object>(0, TypedConstantKind.Array, new object[] { 1, null, "Hi" }); 3451attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3452attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "" }); 3464attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3465attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "" }); 3533attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "MultipleArgumentsToParamsParameter"); 3534attr.VerifyValue<int[]>(1, TypedConstantKind.Array, new int[] { 4, 5, 6 }); 3540attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "NoArgumentsToParamsParameter"); 3541attr.VerifyValue<int[]>(1, TypedConstantKind.Array, new int[] { }); 3547attr.VerifyValue<string>(0, TypedConstantKind.Primitive, "NullArgumentToParamsParameter"); 3548attr.VerifyValue<int[]>(1, TypedConstantKind.Array, null); 3590attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3591attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "whatever" }); 3603attrs.First().VerifyValue<char[]>(0, TypedConstantKind.Array, new char[] { ' ' }); 3604attrs.First().VerifyValue<string[]>(1, TypedConstantKind.Array, new string[] { "whatever" }); 3639attrs.First().VerifyValue(0, TypedConstantKind.Type, typeof(Object)); 3684attrs.First().VerifyValue(0, TypedConstantKind.Array, (object[])null); 4086attr.VerifyValue(0, TypedConstantKind.Enum, (int)(AttributeTargets.Field | AttributeTargets.Event)); 4140attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 4); 4141attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 5); 4183attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 3); 4184attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 4); 4185attrs.First().VerifyValue(2, TypedConstantKind.Primitive, 5); 4229attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2); 4230attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 1); 4272attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 3); 4273attrs.First().VerifyValue(1, TypedConstantKind.Primitive, 4); 4274attrs.First().VerifyValue(2, TypedConstantKind.Primitive, 5); 4318attr.VerifyValue<int>(0, TypedConstantKind.Primitive, 2); 4521attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2); 4527attrs.First().VerifyValue(0, TypedConstantKind.Primitive, 2); 4576attrs.First().VerifyValue(0, TypedConstantKind.Type, cClass.AsUnboundGenericType()); 4616attrs.First().VerifyValue(0, TypedConstantKind.Type, bClass.AsUnboundGenericType()); 5255attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5261attr.VerifyValue<int>(0, TypedConstantKind.Primitive, 1); 5316attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5320attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5328attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5332attr.VerifyValue<object>(0, TypedConstantKind.Primitive, null); 5495attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5500attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5506attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5513attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5522attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5529attrs.First().VerifyValue<object>(0, TypedConstantKind.Type, typeArg); 5618attributes[0].VerifyValue(0, TypedConstantKind.Primitive, value); 9415attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9416attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9417attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9420attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9421attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9422attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9426attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9427attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9428attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9496attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9497attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9498attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9502attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9503attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9504attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9509attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9510attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9511attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9514attrs4[0].VerifyValue(0, TypedConstantKind.Array, new object[] { "A" }); 9515attrs4[1].VerifyValue(0, TypedConstantKind.Primitive, "A"); 9516attrs4[2].VerifyValue(0, TypedConstantKind.Primitive, "A"); 9580attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9581attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9582attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9585attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9586attrs2[1].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9587attrs2[2].VerifyValue(0, TypedConstantKind.Array, (string[])null); 9591attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9592attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9596attrs4[0].VerifyValue(0, TypedConstantKind.Array, value4); 9597attrs4[1].VerifyValue(0, TypedConstantKind.Array, value4); 9598attrs4[2].VerifyValue(0, TypedConstantKind.Array, value4); 9653attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9654attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9657attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9658attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9659attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9663attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9664attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9665attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9727attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9728attrs1[1].VerifyValue(0, TypedConstantKind.Array, value1); 9732attrs2[0].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9733attrs2[1].VerifyValue(0, TypedConstantKind.Primitive, (object)null); 9734attrs2[2].VerifyValue(0, TypedConstantKind.Array, (object[])null); 9739attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9740attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9741attrs3[2].VerifyValue(0, TypedConstantKind.Array, value3); 9744attrs4[0].VerifyValue(0, TypedConstantKind.Array, new object[] { 1 }); 9745attrs4[1].VerifyValue(0, TypedConstantKind.Primitive, 1); 9746attrs4[2].VerifyValue(0, TypedConstantKind.Primitive, 1); 9807attrs1[0].VerifyValue(0, TypedConstantKind.Array, value1); 9808attrs1[1].VerifyValue(0, TypedConstantKind.Array, new object[] { value1 }); 9809attrs1[2].VerifyValue(0, TypedConstantKind.Array, value1); 9813attrs2[0].VerifyValue(0, TypedConstantKind.Array, value2); 9814attrs2[1].VerifyValue(0, TypedConstantKind.Array, value2); 9818attrs3[0].VerifyValue(0, TypedConstantKind.Array, value3); 9819attrs3[1].VerifyValue(0, TypedConstantKind.Array, value3); 9823attrs4[0].VerifyValue(0, TypedConstantKind.Array, value4); 9824attrs4[1].VerifyValue(0, TypedConstantKind.Array, value4); 9825attrs4[2].VerifyValue(0, TypedConstantKind.Array, value4); 9877attrs[0].VerifyValue(0, TypedConstantKind.Array, nullArray); 9879attrs[1].VerifyValue(0, TypedConstantKind.Array, emptyArray); 9881attrs[2].VerifyValue(0, TypedConstantKind.Array, nullArray); 9884attrs[3].VerifyValue(0, TypedConstantKind.Array, emptyArray); 9887attrs[4].VerifyValue(0, TypedConstantKind.Array, nullArray); 9890attrs[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)
141attrSym.VerifyValue(0, TypedConstantKind.Primitive, 1); 165attrSym.VerifyValue(0, TypedConstantKind.Primitive, "ABCDEF5D-2448-447A-B786-64682CBEF123"); 168attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)ComInterfaceType.InterfaceIsIUnknown); 171attrSym.VerifyValue(0, TypedConstantKind.Type, typeof(object)); 174attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)TypeLibTypeFlags.FAggregatable); 177attrSym.VerifyValue(0, TypedConstantKind.Primitive, false); 267attrSym.VerifyValue(0, TypedConstantKind.Primitive, false); 270attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)CallingConvention.StdCall); 283attrSym.VerifyValue(0, TypedConstantKind.Type, typeof(object)); 286attrSym.VerifyValue(0, TypedConstantKind.Primitive, "ProgId"); 290attrSym.VerifyValue(0, TypedConstantKind.Primitive, 123); 293attrSym.VerifyValue(0, TypedConstantKind.Primitive, 1); 307attrSym.VerifyValue(0, TypedConstantKind.Primitive, true); 310attrSym.VerifyValue(1, TypedConstantKind.Primitive, "EGoo, InteropAttribute, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); 318attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)TypeLibVarFlags.FDisplayBind); 322attrSym.VerifyValue(0, TypedConstantKind.Primitive, "message"); 323attrSym.VerifyValue(1, TypedConstantKind.Primitive, false); 417attrSym.VerifyValue(0, TypedConstantKind.Primitive, 99uL); 425attrSym.VerifyValue(0, TypedConstantKind.Primitive, "Ref"); 436attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0f); 456attrSym.VerifyValue(2, TypedConstantKind.Primitive, 100); 470attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)LayoutKind.Explicit); 481attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)UnmanagedType.I8); 483attrSym.VerifyValue(0, TypedConstantKind.Primitive, 0); 2480attrSym.VerifyValue(0, TypedConstantKind.Primitive, "unmanaged.dll"); 2488attrSym.VerifyValue(0, TypedConstantKind.Primitive, "user32.dll"); 5156attrSym.VerifyValue(0, TypedConstantKind.Enum, (int)AttributeTargets.Class); 5162attrSym.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.6.1055.0"); 1187attr1.VerifyValue(0, TypedConstantKind.Primitive, "4.6.1055.0"); 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)
152attribute.VerifyValue(0, TypedConstantKind.Type, newMsCorLib_systemType);