Author: spouliot
Date: 2007-01-05 17:05:29 -0500 (Fri, 05 Jan 2007)
New Revision: 70561
Modified:
trunk/mcs/class/System/Test/System.ComponentModel/ChangeLog
trunk/mcs/class/System/Test/System.ComponentModel/TypeDescriptorTests.cs
Log:
2007-01-05 Sebastien Pouliot <[EMAIL PROTECTED]>
* TypeDescriptorTests.cs: Fix TestGetAttributes t16 as there can be
many [Designer] attributes and their order isn't deterministic (like
the test required).
Modified: trunk/mcs/class/System/Test/System.ComponentModel/ChangeLog
===================================================================
--- trunk/mcs/class/System/Test/System.ComponentModel/ChangeLog 2007-01-05
21:29:24 UTC (rev 70560)
+++ trunk/mcs/class/System/Test/System.ComponentModel/ChangeLog 2007-01-05
22:05:29 UTC (rev 70561)
@@ -1,3 +1,9 @@
+2007-01-05 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * TypeDescriptorTests.cs: Fix TestGetAttributes t16 as there can be
+ many [Designer] attributes and their order isn't deterministic (like
+ the test required).
+
2006-12-28 Gert Driesen <[EMAIL PROTECTED]>
* ContainerTest.cs: Fixed compiler warning.
Modified:
trunk/mcs/class/System/Test/System.ComponentModel/TypeDescriptorTests.cs
===================================================================
--- trunk/mcs/class/System/Test/System.ComponentModel/TypeDescriptorTests.cs
2007-01-05 21:29:24 UTC (rev 70560)
+++ trunk/mcs/class/System/Test/System.ComponentModel/TypeDescriptorTests.cs
2007-01-05 22:05:29 UTC (rev 70561)
@@ -417,7 +417,17 @@
Assert ("t14", col[typeof(DescriptionAttribute)] !=
null);
DesignerAttribute attribute =
col[typeof(DesignerAttribute)] as DesignerAttribute;
Assert ("t15", attribute != null);
- AssertEquals ("t16", attribute.DesignerTypeName,
typeof(MyOtherDesigner).AssemblyQualifiedName);
+ // there are multiple DesignerAttribute present and
their order in the collection isn't deterministic
+ bool found = false;
+ for (int i = 0; i < col.Count; i++) {
+ attribute = (col [i] as DesignerAttribute);
+ if (attribute != null) {
+ found =
typeof(MyOtherDesigner).AssemblyQualifiedName == attribute.DesignerTypeName;
+ if (found)
+ break;
+ }
+ }
+ Assert ("t16", found);
}
[Test]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches