Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitek Karas <vitek.karas@microsoft.com>2021-01-20 11:55:39 +0300
committerGitHub <noreply@github.com>2021-01-20 11:55:39 +0300
commit0707858c4c9a532d057e4b5b1b311a862de4867f (patch)
treef412e33ad9f993a9771c6313e11ef77739687c8a /test/Mono.Linker.Tests.Cases/DataFlow
parent325cd3b76a039e16f4eaf57f665c9f9fb3dac080 (diff)
Add tests validating annotation behavior on delegates (#1766)
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/DataFlow')
-rw-r--r--test/Mono.Linker.Tests.Cases/DataFlow/MemberTypes.cs66
1 files changed, 66 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/MemberTypes.cs b/test/Mono.Linker.Tests.Cases/DataFlow/MemberTypes.cs
index a67a3f902..25ca9f03a 100644
--- a/test/Mono.Linker.Tests.Cases/DataFlow/MemberTypes.cs
+++ b/test/Mono.Linker.Tests.Cases/DataFlow/MemberTypes.cs
@@ -1045,6 +1045,8 @@ namespace Mono.Linker.Tests.Cases.DataFlow
protected class ProtectedBaseNestedType { }
private class PrivateBaseNestedType { }
public class HideBaseNestedType { }
+ public delegate int PublicDelegate ();
+ private delegate int PrivateDelegate ();
}
[Kept]
@@ -1057,6 +1059,14 @@ namespace Mono.Linker.Tests.Cases.DataFlow
private class PrivateNestedType { }
[Kept]
public class HideNestedType { }
+
+ [Kept]
+ [KeptBaseType (typeof (MulticastDelegate))]
+ [KeptMember (".ctor(System.Object,System.IntPtr)")]
+ [KeptMember ("Invoke()")]
+ public delegate int PublicDelegate ();
+
+ private delegate int PrivateDelegate ();
}
@@ -1076,6 +1086,8 @@ namespace Mono.Linker.Tests.Cases.DataFlow
protected class ProtectedBaseNestedType { }
private class PrivateBaseNestedType { }
public class HideBaseNestedType { }
+ public delegate int PublicDelegate ();
+ private delegate int PrivateDelegate ();
}
[Kept]
@@ -1088,6 +1100,14 @@ namespace Mono.Linker.Tests.Cases.DataFlow
[Kept]
private class PrivateNestedType { }
public class HideNestedType { }
+
+ public delegate int PublicDelegate ();
+
+ [Kept]
+ [KeptBaseType (typeof (MulticastDelegate))]
+ [KeptMember (".ctor(System.Object,System.IntPtr)")]
+ [KeptMember ("Invoke()")]
+ private delegate int PrivateDelegate ();
}
@@ -1107,6 +1127,8 @@ namespace Mono.Linker.Tests.Cases.DataFlow
protected class ProtectedBaseNestedType { }
private class PrivateBaseNestedType { }
public class HideBaseNestedType { }
+ public delegate int PublicBaseDelegate ();
+ private delegate int PrivateBaseDelegate ();
}
[Kept]
@@ -1121,6 +1143,18 @@ namespace Mono.Linker.Tests.Cases.DataFlow
private class PrivateNestedType { }
[Kept]
public class HideNestedType { }
+
+ [Kept]
+ [KeptBaseType (typeof (MulticastDelegate))]
+ [KeptMember (".ctor(System.Object,System.IntPtr)")]
+ [KeptMember ("Invoke()")]
+ public delegate int PublicDelegate ();
+
+ [Kept]
+ [KeptBaseType (typeof (MulticastDelegate))]
+ [KeptMember (".ctor(System.Object,System.IntPtr)")]
+ [KeptMember ("Invoke()")]
+ private delegate int PrivateDelegate ();
}
@@ -1694,6 +1728,22 @@ namespace Mono.Linker.Tests.Cases.DataFlow
[Kept]
[KeptMember (".ctor()")]
public class HideBaseNestedType { }
+
+ [Kept]
+ [KeptBaseType (typeof (MulticastDelegate))]
+ [KeptMember (".ctor(System.Object,System.IntPtr)")]
+ [KeptMember ("Invoke()")]
+ [KeptMember ("BeginInvoke(System.AsyncCallback,System.Object)")]
+ [KeptMember ("EndInvoke(System.IAsyncResult)")]
+ public delegate int PublicBaseDelegate ();
+
+ [Kept]
+ [KeptBaseType (typeof (MulticastDelegate))]
+ [KeptMember (".ctor(System.Object,System.IntPtr)")]
+ [KeptMember ("Invoke()")]
+ [KeptMember ("BeginInvoke(System.AsyncCallback,System.Object)")]
+ [KeptMember ("EndInvoke(System.IAsyncResult)")]
+ private delegate int PrivateBaseDelegate ();
}
[Kept]
@@ -1846,6 +1896,22 @@ namespace Mono.Linker.Tests.Cases.DataFlow
[Kept]
[KeptMember (".ctor()")]
public class HideNestedType { }
+
+ [Kept]
+ [KeptBaseType (typeof (MulticastDelegate))]
+ [KeptMember (".ctor(System.Object,System.IntPtr)")]
+ [KeptMember ("Invoke()")]
+ [KeptMember ("BeginInvoke(System.AsyncCallback,System.Object)")]
+ [KeptMember ("EndInvoke(System.IAsyncResult)")]
+ public delegate int PublicDelegate ();
+
+ [Kept]
+ [KeptBaseType (typeof (MulticastDelegate))]
+ [KeptMember (".ctor(System.Object,System.IntPtr)")]
+ [KeptMember ("Invoke()")]
+ [KeptMember ("BeginInvoke(System.AsyncCallback,System.Object)")]
+ [KeptMember ("EndInvoke(System.IAsyncResult)")]
+ private delegate int PrivateDelegate ();
}
[Kept]