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:
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/DataFlow')
-rw-r--r--test/Mono.Linker.Tests.Cases/DataFlow/AnnotatedMembersAccessedViaReflection.cs27
-rw-r--r--test/Mono.Linker.Tests.Cases/DataFlow/DynamicDependencyDataflow.cs6
2 files changed, 11 insertions, 22 deletions
diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/AnnotatedMembersAccessedViaReflection.cs b/test/Mono.Linker.Tests.Cases/DataFlow/AnnotatedMembersAccessedViaReflection.cs
index 07a450776..ef5339d7f 100644
--- a/test/Mono.Linker.Tests.Cases/DataFlow/AnnotatedMembersAccessedViaReflection.cs
+++ b/test/Mono.Linker.Tests.Cases/DataFlow/AnnotatedMembersAccessedViaReflection.cs
@@ -39,8 +39,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow
[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicMethods)]
public static Type _annotatedField;
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
- [ExpectedWarning ("IL2110", nameof (_annotatedField), ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2110", nameof (_annotatedField))]
static void Reflection ()
{
typeof (AnnotatedField).GetField ("_annotatedField").SetValue (null, typeof (TestType));
@@ -52,8 +51,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow
typeof (AnnotatedField).GetField ("_annotatedField").SetValue (null, typeof (TestType));
}
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
- [ExpectedWarning ("IL2110", nameof (_annotatedField), ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2110", nameof (_annotatedField))]
static void ReflectionReadOnly ()
{
typeof (AnnotatedField).GetField ("_annotatedField").GetValue (null);
@@ -160,8 +158,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow
{ }
}
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
- [ExpectedWarning ("IL2111", nameof (MethodWithSingleAnnotatedParameter), ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2111", nameof (MethodWithSingleAnnotatedParameter))]
static void Reflection ()
{
typeof (AnnotatedMethodParameters).GetMethod (nameof (MethodWithSingleAnnotatedParameter)).Invoke (null, null);
@@ -294,8 +291,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow
typeof (AnnotatedMethodReturnValue).GetMethod (nameof (InstanceMethodWithAnnotatedReturnValue)).Invoke (null, null);
}
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
- [ExpectedWarning ("IL2111", nameof (VirtualMethodWithAnnotatedReturnValue), ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2111", nameof (VirtualMethodWithAnnotatedReturnValue))]
static void ReflectionOnVirtual ()
{
typeof (AnnotatedMethodReturnValue).GetMethod (nameof (VirtualMethodWithAnnotatedReturnValue)).Invoke (null, null);
@@ -423,8 +419,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow
public Type PropertyWithAnnotation { get; set; }
}
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
- [ExpectedWarning ("IL2111", nameof (Property1WithAnnotation) + ".set", ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2111", nameof (Property1WithAnnotation) + ".set")]
static void ReflectionOnPropertyItself ()
{
typeof (AnnotatedProperty).GetProperty (nameof (Property1WithAnnotation));
@@ -441,8 +436,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow
typeof (AnnotatedProperty).GetProperty (nameof (Property2WithAnnotationGetterOnly));
}
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
- [ExpectedWarning ("IL2111", nameof (VirtualProperty3WithAnnotationGetterOnly), ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2111", nameof (VirtualProperty3WithAnnotationGetterOnly))]
static void ReflectionOnPropertyWithGetterOnlyOnVirtual ()
{
typeof (AnnotatedProperty).GetProperty (nameof (VirtualProperty3WithAnnotationGetterOnly));
@@ -453,15 +447,13 @@ namespace Mono.Linker.Tests.Cases.DataFlow
typeof (AnnotatedProperty).GetMethod ("get_" + nameof (Property1WithAnnotation));
}
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
- [ExpectedWarning ("IL2111", nameof (Property1WithAnnotation) + ".set", ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2111", nameof (Property1WithAnnotation) + ".set")]
static void ReflectionOnSetter ()
{
typeof (AnnotatedProperty).GetMethod ("set_" + nameof (Property1WithAnnotation));
}
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
- [ExpectedWarning ("IL2111", nameof (VirtualProperty3WithAnnotationGetterOnly) + ".get", ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2111", nameof (VirtualProperty3WithAnnotationGetterOnly) + ".get")]
static void ReflectionOnVirtualGetter ()
{
typeof (AnnotatedProperty).GetMethod ("get_" + nameof (VirtualProperty3WithAnnotationGetterOnly));
@@ -662,8 +654,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow
var _ = new Action<Type> (GenericWithAnnotatedMethod<TestType>.AnnotatedMethod);
}
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
- [ExpectedWarning ("IL2111", nameof (GenericMethodWithAnnotation), ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2111", nameof (GenericMethodWithAnnotation))]
public static void GenericMethodWithAnnotationReflection ()
{
typeof (AnnotationOnGenerics).GetMethod (nameof (GenericMethodWithAnnotation));
diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/DynamicDependencyDataflow.cs b/test/Mono.Linker.Tests.Cases/DataFlow/DynamicDependencyDataflow.cs
index 8237bc4db..029e5848b 100644
--- a/test/Mono.Linker.Tests.Cases/DataFlow/DynamicDependencyDataflow.cs
+++ b/test/Mono.Linker.Tests.Cases/DataFlow/DynamicDependencyDataflow.cs
@@ -18,18 +18,16 @@ namespace Mono.Linker.Tests.Cases.DataFlow
[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicMethods)]
static Type TypeWithPublicMethods;
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
[Kept]
- [ExpectedWarning ("IL2080", nameof (Type.GetField), ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2080", nameof (Type.GetField))]
[DynamicDependency ("DynamicDependencyTo")]
static void DynamicDependencyFrom ()
{
_ = TypeWithPublicMethods.GetField ("f");
}
- // Intrinsic is disabled https://github.com/dotnet/linker/issues/2559
[Kept]
- [ExpectedWarning ("IL2080", nameof (Type.GetProperty), ProducedBy = ProducedBy.Trimmer)]
+ [ExpectedWarning ("IL2080", nameof (Type.GetProperty))]
static void DynamicDependencyTo ()
{
_ = TypeWithPublicMethods.GetProperty ("p");