diff options
author | Marek Safar <marek.safar@gmail.com> | 2020-09-25 10:35:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-25 10:35:43 +0300 |
commit | 1ed1337163b4239d9782e05997d563ee03bde661 (patch) | |
tree | 0de572f23454753753a9eaa99e6c743597310278 /test/Mono.Linker.Tests.Cases.Expectations/Assertions | |
parent | fe430b87123dd2c0f864c35a2150cfc9f1cb8b8c (diff) |
Enable some code analyzers and make the build pass (#1505)
Diffstat (limited to 'test/Mono.Linker.Tests.Cases.Expectations/Assertions')
5 files changed, 6 insertions, 5 deletions
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 () { } |