diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs index bfc580234b2ef6..b2ef8520914794 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs +++ b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/AssemblyChecker.cs @@ -175,8 +175,8 @@ void AddType (TypeDesc type) if (typeDef.IsDelegate) { // AOT's handling of delegates is very different from the IL/metadata picture // So to simplify this, we're going to automatically "mark" all of the delegate's methods - foreach (MethodDesc m in typeDef.GetMethods()) { - if (ShouldIncludeEntityByDisplayName(m)) { + foreach (MethodDesc m in typeDef.GetMethods ()) { + if (ShouldIncludeEntityByDisplayName (m)) { AddMember (m); } } @@ -1195,7 +1195,7 @@ private static IEnumerable GetActiveKeptAttributes (ICustomAttr } object? keptBy = ca.GetPropertyValue (nameof (KeptAttribute.By)); - return keptBy is null ? true : ((ProducedBy) keptBy).HasFlag (ProducedBy.NativeAot); + return keptBy is null ? true : ((Tool) keptBy).HasFlag (Tool.NativeAot); }); } @@ -1212,7 +1212,7 @@ private static IEnumerable GetActiveKeptDerivedAttributes (ICus } object? keptBy = ca.GetPropertyValue (nameof (KeptAttribute.By)); - return keptBy is null ? true : ((ProducedBy) keptBy).HasFlag (ProducedBy.NativeAot); + return keptBy is null ? true : ((Tool) keptBy).HasFlag (Tool.NativeAot); }); } diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs index f7db7fcf288cd7..4d694b7ae0061c 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs +++ b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/ResultChecker.cs @@ -168,7 +168,7 @@ protected virtual void AdditionalChecking (ILCompilerTestCaseResult linkResult, private static bool IsProducedByNativeAOT (CustomAttribute attr) { var producedBy = attr.GetPropertyValue ("ProducedBy"); - return producedBy is null ? true : ((ProducedBy) producedBy).HasFlag (ProducedBy.NativeAot); + return producedBy is null ? true : ((Tool) producedBy).HasFlag (Tool.NativeAot); } private static IEnumerable GetAttributeProviders (AssemblyDefinition assembly) @@ -405,7 +405,7 @@ static bool LogMessageHasSameOriginMember (MessageContainer mc, ICustomAttribute var actualOriginToken = new AssemblyQualifiedToken (origin.Value.MemberDefinition); var expectedOriginToken = new AssemblyQualifiedToken (expectedOriginMember); - if (actualOriginToken.Equals(expectedOriginToken)) + if (actualOriginToken.Equals (expectedOriginToken)) return true; var actualMember = origin.Value.MemberDefinition; diff --git a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCompilationMetadataProvider.cs b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCompilationMetadataProvider.cs index b1246cf12f2a72..e97a51a5c2c737 100644 --- a/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCompilationMetadataProvider.cs +++ b/src/coreclr/tools/aot/Mono.Linker.Tests/TestCasesRunner/TestCaseCompilationMetadataProvider.cs @@ -29,13 +29,13 @@ public TestCaseCompilationMetadataProvider (TestCase testCase, AssemblyDefinitio private static bool IsIgnoredByNativeAOT (CustomAttribute attr) { var ignoredBy = attr.GetPropertyValue ("IgnoredBy"); - return ignoredBy is null ? true : ((ProducedBy) ignoredBy).HasFlag (ProducedBy.NativeAot); + return ignoredBy is null ? true : ((Tool) ignoredBy).HasFlag (Tool.NativeAot); } - public virtual bool IsIgnored ([NotNullWhen(true)] out string? reason) + public virtual bool IsIgnored ([NotNullWhen (true)] out string? reason) { var ignoreAttribute = _testCaseTypeDefinition.CustomAttributes.FirstOrDefault (attr => attr.AttributeType.Name == nameof (IgnoreTestCaseAttribute)); - if (ignoreAttribute != null && IsIgnoredByNativeAOT(ignoreAttribute)) { + if (ignoreAttribute != null && IsIgnoredByNativeAOT (ignoreAttribute)) { if (ignoreAttribute.ConstructorArguments.Count == 1) { reason = (string) ignoreAttribute.ConstructorArguments.First ().Value; return true; diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/DynamicDependencies/DynamicDependencyMethod.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/DynamicDependencies/DynamicDependencyMethod.cs index 5a935bd55b980e..75db763733993e 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/DynamicDependencies/DynamicDependencyMethod.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/DynamicDependencies/DynamicDependencyMethod.cs @@ -203,7 +203,7 @@ public static void Test () [KeptMember (".ctor()")] private abstract class AbstractMethods { - [Kept (By = ProducedBy.Trimmer)] // NativeAOT test infra doesn't check reflection-only methods (without entry point) yet + [Kept (By = Tool.Trimmer)] // NativeAOT test infra doesn't check reflection-only methods (without entry point) yet [DynamicDependency (nameof (TargetMethod))] public abstract void SourceAbstractViaReflection ();