diff options
Diffstat (limited to 'test')
10 files changed, 17 insertions, 9 deletions
diff --git a/test/ILLink.Tasks.Tests/ILLink.Tasks.Tests.csproj b/test/ILLink.Tasks.Tests/ILLink.Tasks.Tests.csproj index 871a186c3..d800ade3a 100644 --- a/test/ILLink.Tasks.Tests/ILLink.Tasks.Tests.csproj +++ b/test/ILLink.Tasks.Tests/ILLink.Tasks.Tests.csproj @@ -3,6 +3,7 @@ <PropertyGroup> <TargetFramework>net5.0</TargetFramework> <IsPackable>false</IsPackable> + <RunAnalyzers>false</RunAnalyzers> </PropertyGroup> <ItemGroup> diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedExceptionHandlerSequenceAttribute.cs b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedExceptionHandlerSequenceAttribute.cs index a90456dc6..0c9f10e4a 100644 --- a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedExceptionHandlerSequenceAttribute.cs +++ b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedExceptionHandlerSequenceAttribute.cs @@ -8,7 +8,7 @@ namespace Mono.Linker.Tests.Cases.Expectations.Assertions public ExpectedExceptionHandlerSequenceAttribute (string[] types) { if (types == null) - throw new ArgumentNullException (); + throw new ArgumentNullException (nameof (types)); } } }
\ No newline at end of file diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedInstructionSequenceAttribute.cs b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedInstructionSequenceAttribute.cs index 5254351f5..7afdbb3b5 100644 --- a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedInstructionSequenceAttribute.cs +++ b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedInstructionSequenceAttribute.cs @@ -8,7 +8,7 @@ namespace Mono.Linker.Tests.Cases.Expectations.Assertions public ExpectedInstructionSequenceAttribute (string[] opCodes) { if (opCodes == null) - throw new ArgumentNullException (); + throw new ArgumentNullException (nameof (opCodes)); } } }
\ No newline at end of file diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedLocalsSequenceAttribute.cs b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedLocalsSequenceAttribute.cs index 6eea5b561..17f9cae1c 100644 --- a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedLocalsSequenceAttribute.cs +++ b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedLocalsSequenceAttribute.cs @@ -8,13 +8,13 @@ namespace Mono.Linker.Tests.Cases.Expectations.Assertions public ExpectedLocalsSequenceAttribute (string[] types) { if (types == null) - throw new ArgumentNullException (); + throw new ArgumentNullException (nameof (types)); } public ExpectedLocalsSequenceAttribute (Type[] types) { if (types == null) - throw new ArgumentNullException (); + throw new ArgumentNullException (nameof (types)); } } }
\ No newline at end of file diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptInitializerData.cs b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptInitializerData.cs index b2c5647f0..6c448617c 100644 --- a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptInitializerData.cs +++ b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/KeptInitializerData.cs @@ -13,7 +13,7 @@ namespace Mono.Linker.Tests.Cases.Expectations.Assertions public KeptInitializerData (int occurrenceIndexInBody) { if (occurrenceIndexInBody < 0) - throw new ArgumentException (); + throw new ArgumentOutOfRangeException (nameof (occurrenceIndexInBody)); } } }
\ No newline at end of file diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/NoLinkedOutputAttribute.cs b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/NoLinkedOutputAttribute.cs index 0537a62e1..77574cad6 100644 --- a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/NoLinkedOutputAttribute.cs +++ b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/NoLinkedOutputAttribute.cs @@ -2,6 +2,7 @@ namespace Mono.Linker.Tests.Cases.Expectations.Assertions { + [AttributeUsage (AttributeTargets.Class)] public class NoLinkedOutputAttribute : Attribute { public NoLinkedOutputAttribute () { } diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj b/test/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj index fe28def77..211c1540b 100644 --- a/test/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj +++ b/test/Mono.Linker.Tests.Cases.Expectations/Mono.Linker.Tests.Cases.Expectations.csproj @@ -2,6 +2,7 @@ <PropertyGroup> <LangVersion>latest</LangVersion> + <RunAnalyzers>false</RunAnalyzers> </PropertyGroup> <PropertyGroup Condition="'$(MonoBuild)' == ''"> diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Support/PlatformAssemblies.cs b/test/Mono.Linker.Tests.Cases.Expectations/Support/PlatformAssemblies.cs index 11c2f259c..d3c2dfcbd 100644 --- a/test/Mono.Linker.Tests.Cases.Expectations/Support/PlatformAssemblies.cs +++ b/test/Mono.Linker.Tests.Cases.Expectations/Support/PlatformAssemblies.cs @@ -1,8 +1,11 @@ -public static class PlatformAssemblies +namespace Mono.Linker.Tests.Cases.Expectations.Metadata { + public static class PlatformAssemblies + { #if NETCOREAPP - public const string CoreLib = "System.Private.CoreLib.dll"; + public const string CoreLib = "System.Private.CoreLib.dll"; #else - public const string CoreLib = "mscorlib.dll"; + public const string CoreLib = "mscorlib.dll"; #endif -} + } +}
\ No newline at end of file diff --git a/test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj b/test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj index 645f3523e..6ebfb9890 100644 --- a/test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj +++ b/test/Mono.Linker.Tests.Cases/Mono.Linker.Tests.Cases.csproj @@ -6,6 +6,7 @@ <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> <LangVersion>Latest</LangVersion> + <RunAnalyzers>false</RunAnalyzers> </PropertyGroup> <PropertyGroup Condition="'$(MonoBuild)' == ''"> diff --git a/test/Mono.Linker.Tests/Mono.Linker.Tests.csproj b/test/Mono.Linker.Tests/Mono.Linker.Tests.csproj index ff19e3e6e..56c70481a 100644 --- a/test/Mono.Linker.Tests/Mono.Linker.Tests.csproj +++ b/test/Mono.Linker.Tests/Mono.Linker.Tests.csproj @@ -3,6 +3,7 @@ <PropertyGroup> <LangVersion>latest</LangVersion> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + <RunAnalyzers>false</RunAnalyzers> </PropertyGroup> <PropertyGroup Condition="'$(MonoBuild)' == ''"> |