diff options
author | Mateo Torres-Ruiz <mateoatr@users.noreply.github.com> | 2021-06-01 19:20:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 19:20:35 +0300 |
commit | bff5d8b55adb71afd0f132b9e15646787b07b879 (patch) | |
tree | fedc069c0f7c6ebe306934585c8bfb33a578e6c1 /test/Mono.Linker.Tests.Cases/Reflection | |
parent | 493a448586c1fad68efc2126836f5bb9b5f9ad20 (diff) |
Add support for UnrecognizedReflectionAccessPattern in analyzer test infra (#2048)
* Refactor TestCaseUtils
* Whitespace
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/Reflection')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Reflection/ActivatorCreateInstance.cs | 6 | ||||
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructorUsedViaReflection.cs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/ActivatorCreateInstance.cs b/test/Mono.Linker.Tests.Cases/Reflection/ActivatorCreateInstance.cs index 7b5f97803..8f1cfae07 100644 --- a/test/Mono.Linker.Tests.Cases/Reflection/ActivatorCreateInstance.cs +++ b/test/Mono.Linker.Tests.Cases/Reflection/ActivatorCreateInstance.cs @@ -307,7 +307,7 @@ namespace Mono.Linker.Tests.Cases.Reflection [Kept] [UnrecognizedReflectionAccessPattern (typeof (Activator), nameof (Activator.CreateInstance), new Type[] { typeof (string), typeof (string) }, - messageCode: "IL2032", message: "assemblyName")] + messageCode: "IL2032", message: new string[] { "assemblyName" })] private static void WithNullAssemblyName () { Activator.CreateInstance (null, "Mono.Linker.Tests.Cases.Reflection.ActivatorCreateInstance+WithAssemblyNameParameterless1"); @@ -315,7 +315,7 @@ namespace Mono.Linker.Tests.Cases.Reflection [Kept] [UnrecognizedReflectionAccessPattern (typeof (Activator), nameof (Activator.CreateInstance), new Type[] { typeof (string), typeof (string) }, - messageCode: "IL2061", message: "NonExistingAssembly")] + messageCode: "IL2061", message: new string[] { "NonExistingAssembly" })] private static void WithNonExistingAssemblyName () { Activator.CreateInstance ("NonExistingAssembly", "Mono.Linker.Tests.Cases.Reflection.ActivatorCreateInstance+WithAssemblyNameParameterless1"); @@ -326,7 +326,7 @@ namespace Mono.Linker.Tests.Cases.Reflection [Kept] [UnrecognizedReflectionAccessPattern (typeof (Activator), nameof (Activator.CreateInstance), new Type[] { typeof (string), typeof (string), typeof (object[]) }, - messageCode: "IL2032", message: "typeName")] + messageCode: "IL2032", message: new string[] { "typeName" })] private static void WithAssemblyAndUnknownTypeName () { Activator.CreateInstance ("test", _typeNameField, new object[] { }); diff --git a/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructorUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructorUsedViaReflection.cs index a4c39a145..e4670746c 100644 --- a/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructorUsedViaReflection.cs +++ b/test/Mono.Linker.Tests.Cases/Reflection/RunClassConstructorUsedViaReflection.cs @@ -48,7 +48,7 @@ namespace Mono.Linker.Tests.Cases.Reflection [Kept] [UnrecognizedReflectionAccessPattern (typeof (RuntimeHelpers), nameof (RuntimeHelpers.RunClassConstructor), new Type[] { typeof (RuntimeTypeHandle) }, - messageCode: "IL2059", message: "RunClassConstructor")] + messageCode: "IL2059", message: new string[] { "RunClassConstructor" })] static void TestDataFlowType () { |