diff --git a/external/mono b/external/mono index 2eda626316..df81fe40c5 160000 --- a/external/mono +++ b/external/mono @@ -1 +1 @@ -Subproject commit 2eda626316fd8f70cd98947af2f89b7ca9b0ebe5 +Subproject commit df81fe40c5f3324d2aad9caccf85a04142aa9cc3 diff --git a/tests/linker-ios/link all/AttributeTest.cs b/tests/linker-ios/link all/AttributeTest.cs index c72cd763d4..0679ee89f6 100644 --- a/tests/linker-ios/link all/AttributeTest.cs +++ b/tests/linker-ios/link all/AttributeTest.cs @@ -26,7 +26,12 @@ using NUnit.Framework; [assembly: Debuggable (DebuggableAttribute.DebuggingModes.Default)] [assembly: LinkAll.Attributes.CustomAttributeArray (typeof (LinkAll.Attributes.CustomTypeA))] +[assembly: LinkAll.Attributes.CustomAttributeArray (typeof (LinkAll.Attributes.CustomTypeAA[][]))] +[assembly: LinkAll.Attributes.CustomAttributeArray (typeof (LinkAll.Attributes.CustomTypeAAA[,]))] +//[assembly: LinkAll.Attributes.CustomAttributeArray (new object [] { typeof (LinkAll.Attributes.CustomTypeAAAA) })] [assembly: LinkAll.Attributes.CustomAttribute (typeof (LinkAll.Attributes.CustomType))] +[assembly: LinkAll.Attributes.CustomAttribute (typeof (List))] +//[assembly: LinkAll.Attributes.CustomAttributeObject (typeof (LinkAll.Attributes.CustomTypeO))] namespace LinkAll.Attributes { @@ -48,6 +53,7 @@ namespace LinkAll.Attributes { public int Property { get; set; } } + [AttributeUsage (AttributeTargets.All, AllowMultiple = true)] public class CustomAttributeArray : Attribute { readonly Type[] _types; @@ -55,11 +61,26 @@ namespace LinkAll.Attributes { { _types = types; } + + public CustomAttributeArray (params object [] types) + { + _types = (Type[]) types; + } } public class CustomTypeA { } + public class CustomTypeAA { + } + + public class CustomTypeAAA { + } + + public class CustomTypeAAAA { + } + + [AttributeUsage (AttributeTargets.All, AllowMultiple = true)] public class CustomAttribute : Attribute { readonly Type _type; @@ -72,6 +93,23 @@ namespace LinkAll.Attributes { public class CustomType { } + public class CustomTypeG { + } + + [AttributeUsage (AttributeTargets.All, AllowMultiple = true)] + public class CustomAttributeObject : Attribute + { + readonly Type _type; + + public CustomAttributeObject (object type) + { + _type = (Type)type; + } + } + + public class CustomTypeO { + } + [FileIOPermission (SecurityAction.LinkDemand, AllLocalFiles = FileIOPermissionAccess.AllAccess)] public class SecurityDeclarationDecoratedUserCode { @@ -165,12 +203,20 @@ namespace LinkAll.Attributes { { var assembly = GetType ().Assembly; var ta = assembly.GetCustomAttributes (); - Assert.That (ta.Count (), Is.EqualTo (1), "Type[]"); + Assert.That (ta.Count (), Is.EqualTo (3), "Type[]"); Assert.NotNull (Type.GetType ("LinkAll.Attributes.CustomTypeA"), "CustomTypeA"); + Assert.NotNull (Type.GetType ("LinkAll.Attributes.CustomTypeAA"), "CustomTypeAA"); + Assert.NotNull (Type.GetType ("LinkAll.Attributes.CustomTypeAAA"), "CustomTypeAAA"); + //Assert.NotNull (Type.GetType ("LinkAll.Attributes.CustomTypeAAAA"), "CustomTypeAAAA"); var t = assembly.GetCustomAttributes(); - Assert.That (t.Count (), Is.EqualTo (1), "Type"); + Assert.That (t.Count (), Is.EqualTo (2), "Type"); Assert.NotNull (Type.GetType ("LinkAll.Attributes.CustomType"), "CustomType"); + Assert.NotNull (Type.GetType ("LinkAll.Attributes.CustomTypeG"), "CustomTypeG"); + + //var to = assembly.GetCustomAttributes (); + //Assert.That (to.Count (), Is.EqualTo (1), "Object"); + //Assert.NotNull (Type.GetType ("LinkAll.Attributes.CustomTypeO"), "CustomTypeO"); } [Test]