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/DataFlow | |
parent | 493a448586c1fad68efc2126836f5bb9b5f9ad20 (diff) |
Add support for UnrecognizedReflectionAccessPattern in analyzer test infra (#2048)
* Refactor TestCaseUtils
* Whitespace
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/DataFlow')
4 files changed, 5 insertions, 5 deletions
diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/FieldDataFlow.cs b/test/Mono.Linker.Tests.Cases/DataFlow/FieldDataFlow.cs index 380b72a70..8b9fc965c 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/FieldDataFlow.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/FieldDataFlow.cs @@ -143,7 +143,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow TypeStore._staticTypeWithPublicParameterlessConstructor = GetUnkownType (); } - [UnrecognizedReflectionAccessPattern (typeof (TypeStore), nameof (TypeStore._staticTypeWithPublicParameterlessConstructor), messageCode: "IL2064", message: nameof (TypeStore._staticTypeWithPublicParameterlessConstructor))] + [UnrecognizedReflectionAccessPattern (typeof (TypeStore), nameof (TypeStore._staticTypeWithPublicParameterlessConstructor), messageCode: "IL2064", message: new string[] { nameof (TypeStore._staticTypeWithPublicParameterlessConstructor) })] private void WriteUnknownValue () { var array = new object[1]; diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/GetTypeDataFlow.cs b/test/Mono.Linker.Tests.Cases/DataFlow/GetTypeDataFlow.cs index 0791625ab..0e6dcf1c7 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/GetTypeDataFlow.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/GetTypeDataFlow.cs @@ -121,9 +121,9 @@ namespace Mono.Linker.Tests.Cases.DataFlow } [UnrecognizedReflectionAccessPattern (typeof (GetTypeDataFlow), nameof (RequireNonPublicConstructors), new Type[] { typeof (Type) }, - messageCode: "IL2072", message: "GetType")] + messageCode: "IL2072", message: new string[] { "GetType" })] [UnrecognizedReflectionAccessPattern (typeof (Type), nameof (Type.GetType), new Type[] { typeof (string) }, - messageCode: "IL2057", message: "System.Type.GetType(String)")] + messageCode: "IL2057", message: new string[] { "System.Type.GetType(String)" })] static void TestMultipleMixedValues () { string typeName = null; diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/MethodReturnParameterDataFlow.cs b/test/Mono.Linker.Tests.Cases/DataFlow/MethodReturnParameterDataFlow.cs index 61f92971a..c46e9ab54 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/MethodReturnParameterDataFlow.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/MethodReturnParameterDataFlow.cs @@ -127,7 +127,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow [UnrecognizedReflectionAccessPattern (typeof (MethodReturnParameterDataFlow), nameof (ReturnUnknownValue), new Type[] { }, returnType: typeof (Type), - messageCode: "IL2063", message: nameof (ReturnUnknownValue))] + messageCode: "IL2063", message: new string[] { nameof (ReturnUnknownValue) })] [return: DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors)] Type ReturnUnknownValue () { diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/MethodThisDataFlow.cs b/test/Mono.Linker.Tests.Cases/DataFlow/MethodThisDataFlow.cs index a8bfbed1f..e1eb09b05 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/MethodThisDataFlow.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/MethodThisDataFlow.cs @@ -95,7 +95,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow } [UnrecognizedReflectionAccessPattern (typeof (MethodThisDataFlowTypeTest), nameof (MethodThisDataFlowTypeTest.RequireThisNonPublicMethods), new Type[] { }, - messageCode: "IL2065", message: nameof (MethodThisDataFlowTypeTest.RequireThisNonPublicMethods))] + messageCode: "IL2065", message: new string[] { nameof (MethodThisDataFlowTypeTest.RequireThisNonPublicMethods) })] static void TestUnknownThis () { var array = new object[1]; |