X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FTest%2FSystem.Reflection%2FParameterInfoTest.cs;h=423c7c0670d9d915f1a031208f0cc87b21740af1;hb=24748ce981a554c4a8f9529e5848a88c743a1901;hp=90362747a6c39b92aa2e5faa57d5bc96fb1aa9b8;hpb=36afbc6563844551a0c060eca00730addf8e654c;p=mono.git diff --git a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs index 90362747a6c..423c7c0670d 100644 --- a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Collections.Generic; +using System.Linq; using NUnit.Framework; @@ -260,6 +261,26 @@ namespace MonoTests.System.Reflection } #endif + class TestAttribute : Attribute + { + } + + public static int TestCustomAttribute_Method ([Test] string arg) + { + return arg.Length; + } + + [Test] + public void TestCustomAttribute () + { + var metInfo = GetType ().GetMethod ("TestCustomAttribute_Method", new Type[] { typeof(string) }); + var paramInfos = metInfo.GetParameters (); + var argParamInfo = paramInfos[0]; + + var custAttrs = argParamInfo.GetCustomAttributes (); + Assert.AreEqual (1, custAttrs.Count ()); + } + class MyParameterInfo2 : ParameterInfo { public ParameterAttributes MyAttrsImpl; @@ -332,7 +353,9 @@ namespace MonoTests.System.Reflection } #endif Assert.IsFalse (p.IsIn, "#7"); +#if FEATURE_USE_LCID Assert.IsFalse (p.IsLcid, "#8"); +#endif Assert.IsFalse (p.IsOptional, "#9"); Assert.IsFalse (p.IsOut, "#10"); Assert.IsFalse (p.IsRetval, "#10");