Remove illink test workaround for removed declaring type (#89529)
authorSven Boemer <sbomer@gmail.com>
Thu, 27 Jul 2023 09:10:34 +0000 (02:10 -0700)
committerGitHub <noreply@github.com>
Thu, 27 Jul 2023 09:10:34 +0000 (11:10 +0200)
src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/MethodReturnParameterDataFlow.cs
src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/PropertyDataFlow.cs
src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs

index 394f615..544e631 100644 (file)
@@ -36,6 +36,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow
                        instance.ReturnWithRequirementsAlwaysThrows ();
 
                        UnsupportedReturnType ();
+                       UnsupportedReturnTypeAndParameter (null);
                }
 
                static Type NoRequirements ()
index 1c3713e..5dbca22 100644 (file)
@@ -32,6 +32,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow
                        instance.PropertyPublicParameterlessConstructorWithExplicitAccessors = null;
                        instance.PropertyPublicConstructorsWithExplicitAccessors = null;
                        instance.PropertyNonPublicConstructorsWithExplicitAccessors = null;
+                       _ = PropertyWithUnsupportedType;
 
                        TestAutomaticPropagation ();
 
index bef6cd7..b2c6704 100644 (file)
@@ -974,16 +974,7 @@ namespace Mono.Linker.Tests.TestCasesRunner
 
                                var actualMember = origin?.Provider as IMemberDefinition;
                                var expectedOriginMember = expectedOriginProvider as IMemberDefinition;
-                               if (actualMember?.FullName == expectedOriginMember.FullName)
-                                       return true;
-
-                               // Compensate for cases where for some reason the OM doesn't preserve the declaring types
-                               // on certain things after trimming.
-                               if (actualMember != null && actualMember?.DeclaringType == null &&
-                                       actualMember?.Name == expectedOriginMember.Name)
-                                       return true;
-
-                               return false;
+                               return actualMember?.FullName == expectedOriginMember.FullName;
                        }
                }