Author: zoltan
Date: 2007-06-01 19:20:01 -0400 (Fri, 01 Jun 2007)
New Revision: 78465
Modified:
trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog
trunk/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
Log:
2007-06-02 Zoltan Varga <[EMAIL PROTECTED]>
* PropertyInfoTest.cs: Added new test.
Modified: trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog 2007-06-01
23:19:22 UTC (rev 78464)
+++ trunk/mcs/class/corlib/Test/System.Reflection/ChangeLog 2007-06-01
23:20:01 UTC (rev 78465)
@@ -1,3 +1,7 @@
+2007-06-02 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * PropertyInfoTest.cs: Added new test.
+
2007-05-07 Gert Driesen <[EMAIL PROTECTED]>
* MethodInfoTest.cs: Modified test for bug #81538 to verify both
Modified: trunk/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
2007-06-01 23:19:22 UTC (rev 78464)
+++ trunk/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
2007-06-01 23:20:01 UTC (rev 78465)
@@ -9,6 +9,7 @@
using System;
using System.Reflection;
+using System.ComponentModel;
using NUnit.Framework;
@@ -29,6 +30,31 @@
}
+ [Test]
+ public void GetCustomAttributesInherited ()
+ {
+ Type derived = typeof (Derived);
+ PropertyInfo p = derived.GetProperty ("P");
+
+ Assert.AreEqual (2, p.GetCustomAttributes
(true).Length);
+ }
+
+ class Base {
+ [DesignOnly (true)]
+ [Description ("Desc")]
+ public virtual string P {
+ get { return null; }
+ set { }
+ }
+ }
+
+ class Derived : Base {
+ public override string P {
+ get { return null; }
+ set { }
+ }
+ }
+
#if NET_2_0
public class A<T>
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches