diff options
12 files changed, 23 insertions, 24 deletions
diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/IReflectDataflow.cs b/test/Mono.Linker.Tests.Cases/DataFlow/IReflectDataflow.cs index 4d7de68c8..2b53fdca2 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/IReflectDataflow.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/IReflectDataflow.cs @@ -1,17 +1,18 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; -using System.Text; using Mono.Linker.Tests.Cases.Expectations.Assertions; namespace Mono.Linker.Tests.Cases.DataFlow { // Hits what appears to be a bug in the tool // Could not initialize vtable of class(0x02000007) .MyReflect due to VTable setup of type Mono.Linker.Tests.Cases.DataFlow.IReflectDataflow+MyReflect failed assembly:/tmp/linker_tests/output/test.exe type:MyReflect member:(null) +#if ILLINK [SkipPeVerify (SkipPeVerifyForToolchian.Pedump)] +#else + [SkipPeVerify] +#endif class IReflectDataflow { public static void Main () diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/PropertyDataFlow.cs b/test/Mono.Linker.Tests.Cases/DataFlow/PropertyDataFlow.cs index 72acb4ec1..d6ee5cab7 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/PropertyDataFlow.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/PropertyDataFlow.cs @@ -3,11 +3,8 @@ // See the LICENSE file in the project root for more information. using System; -using System.Collections.Generic; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -using System.Text; using Mono.Linker.Tests.Cases.Expectations.Assertions; namespace Mono.Linker.Tests.Cases.DataFlow diff --git a/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.cs b/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.cs index 18bc4aa7d..ca45c499f 100644 --- a/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.cs +++ b/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.cs @@ -15,6 +15,9 @@ namespace Mono.Linker.Tests.Cases.LinkAttributes [SetupLinkAttributesFile ("LinkerAttributeRemoval.xml")] [IgnoreLinkAttributes (false)] +#if !ILLINK + [Reference ("System.dll")] +#endif [SetupCompileBefore ("attribute.dll", new[] { "Dependencies/LinkerAttributeRemovalAttributeToRemove.cs" })] [SetupCompileBefore ("copyattribute.dll", new[] { "Dependencies/LinkerAttributeRemovalAttributeFromCopyAssembly.cs" })] [SetupLinkerAction ("copy", "copyattribute")] diff --git a/test/Mono.Linker.Tests.Cases/Logging/SourceLines.cs b/test/Mono.Linker.Tests.Cases/Logging/SourceLines.cs index 5d54b8515..50f626cc5 100644 --- a/test/Mono.Linker.Tests.Cases/Logging/SourceLines.cs +++ b/test/Mono.Linker.Tests.Cases/Logging/SourceLines.cs @@ -1,6 +1,5 @@ using System; using System.Diagnostics.CodeAnalysis; -using System.Linq.Expressions; using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; @@ -9,11 +8,11 @@ namespace Mono.Linker.Tests.Cases.Logging [SkipKeptItemsValidation] [SetupCompileBefore ("FakeSystemAssembly.dll", new[] { "../PreserveDependencies/Dependencies/PreserveDependencyAttribute.cs" })] [SetupCompileArgument ("/debug:full")] - [LogContains ("(37,4): Trim analysis warning IL2074: Mono.Linker.Tests.Cases.Logging.SourceLines.UnrecognizedReflectionPattern(): " + + [LogContains ("(36,4): Trim analysis warning IL2074: Mono.Linker.Tests.Cases.Logging.SourceLines.UnrecognizedReflectionPattern(): " + "The requirements declared via the 'DynamicallyAccessedMembersAttribute' on the return value of method 'Mono.Linker.Tests.Cases.Logging.SourceLines.GetUnknownType()' " + "don't match those on the field 'System.Type Mono.Linker.Tests.Cases.Logging.SourceLines::type'. " + "The source value must declare at least the same requirements as those declared on the target location it's assigned to ")] - [LogContains ("(38,4): Trim analysis warning IL2074: Mono.Linker.Tests.Cases.Logging.SourceLines.UnrecognizedReflectionPattern(): " + + [LogContains ("(37,4): Trim analysis warning IL2074: Mono.Linker.Tests.Cases.Logging.SourceLines.UnrecognizedReflectionPattern(): " + "The requirements declared via the 'DynamicallyAccessedMembersAttribute' on the return value of method 'Mono.Linker.Tests.Cases.Logging.SourceLines.GetUnknownType()' " + "don't match those on the field 'System.Type Mono.Linker.Tests.Cases.Logging.SourceLines::type'. " + "The source value must declare at least the same requirements as those declared on the target location it's assigned to ")] diff --git a/test/Mono.Linker.Tests.Cases/Warnings/CanDisableWarnings.cs b/test/Mono.Linker.Tests.Cases/Warnings/CanDisableWarnings.cs index 27f624161..44585dddb 100644 --- a/test/Mono.Linker.Tests.Cases/Warnings/CanDisableWarnings.cs +++ b/test/Mono.Linker.Tests.Cases/Warnings/CanDisableWarnings.cs @@ -1,7 +1,4 @@ -using System; -using System.Linq.Expressions; -using System.Runtime.CompilerServices; -using Mono.Linker.Tests.Cases.Expectations.Assertions; +using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; namespace Mono.Linker.Tests.Cases.Warnings diff --git a/test/Mono.Linker.Tests.Cases/Warnings/CanNotWarnAsErrorForDisabledVersion.cs b/test/Mono.Linker.Tests.Cases/Warnings/CanNotWarnAsErrorForDisabledVersion.cs index 88c933039..f393896a2 100644 --- a/test/Mono.Linker.Tests.Cases/Warnings/CanNotWarnAsErrorForDisabledVersion.cs +++ b/test/Mono.Linker.Tests.Cases/Warnings/CanNotWarnAsErrorForDisabledVersion.cs @@ -1,6 +1,4 @@ using System; -using System.Linq.Expressions; -using System.Reflection; using System.Diagnostics.CodeAnalysis; using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; diff --git a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/CanGenerateWarningSuppressionFileCSharp.cs b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/CanGenerateWarningSuppressionFileCSharp.cs index a064b83f7..eaa315239 100644 --- a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/CanGenerateWarningSuppressionFileCSharp.cs +++ b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/CanGenerateWarningSuppressionFileCSharp.cs @@ -8,6 +8,9 @@ using System.Text; namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression { +#if !ILLINK + [Reference ("System.Core.dll")] +#endif [SetupLinkerCoreAction ("skip")] [SetupCompileBefore ("library.dll", new[] { "Dependencies/TriggerWarnings_Lib.cs" })] [KeptAssembly ("library.dll")] diff --git a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/CanGenerateWarningSuppressionFileXml.cs b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/CanGenerateWarningSuppressionFileXml.cs index 5b0acf397..223b470af 100644 --- a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/CanGenerateWarningSuppressionFileXml.cs +++ b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/CanGenerateWarningSuppressionFileXml.cs @@ -1,10 +1,6 @@ using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; using Mono.Linker.Tests.Cases.Warnings.WarningSuppression.Dependencies; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text; namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression { diff --git a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInAssembly.cs b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInAssembly.cs index e37f800e3..d5e8a0b4b 100644 --- a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInAssembly.cs +++ b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInAssembly.cs @@ -8,6 +8,9 @@ using System.Linq.Expressions; namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression { +#if !ILLINK + [Reference ("System.Core.dll")] +#endif [SkipKeptItemsValidation] [LogDoesNotContain ("TriggerUnrecognizedPattern()")] public class SuppressWarningsInAssembly diff --git a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypes.cs b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypes.cs index 7499df8b3..b50279fdc 100644 --- a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypes.cs +++ b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypes.cs @@ -1,12 +1,7 @@ using Mono.Linker.Tests.Cases.Expectations.Assertions; -using Mono.Linker.Tests.Cases.Expectations.Metadata; using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Text; namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression { diff --git a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs index 1da20c511..9ad6a99e1 100644 --- a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs +++ b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; using System.Text; +using Mono.Linker.Tests.Cases.Expectations.Metadata; [module: UnconditionalSuppressMessage ("Test", "IL2072", Scope = "type", Target = "T:Mono.Linker.Tests.Cases.Warnings.WarningSuppression.WarningsInType")] [module: UnconditionalSuppressMessage ("Test", "IL2072", Scope = "member", Target = "M:Mono.Linker.Tests.Cases.Warnings.WarningSuppression.WarningsInMembers.Method")] @@ -11,6 +12,9 @@ using System.Text; namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression { +#if !ILLINK + [Reference ("System.Core.dll")] +#endif [SkipKeptItemsValidation] [LogDoesNotContain ("TriggerUnrecognizedPattern()")] public class SuppressWarningsInMembersAndTypesUsingTarget diff --git a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInModule.cs b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInModule.cs index 5c0a38fb8..e676c6f5d 100644 --- a/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInModule.cs +++ b/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInModule.cs @@ -8,6 +8,9 @@ using System.Linq.Expressions; namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression { +#if !ILLINK + [Reference ("System.Core.dll")] +#endif [SkipKeptItemsValidation] [LogDoesNotContain ("TriggerUnrecognizedPattern()")] public class SuppressWarningsInModule |