diff options
author | Vitek Karas <10670590+vitek-karas@users.noreply.github.com> | 2022-02-17 23:45:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-17 23:45:47 +0300 |
commit | d87097f01e62c05070a228d0725c4a752da0b3f4 (patch) | |
tree | e0912c62391729264cd58cab995c28e8476b18a6 /test/Mono.Linker.Tests.Cases | |
parent | 60bce42bd5e2386678ae977e5a935ebe2bf91fe4 (diff) |
Update tests to match analyzer behavior around intrinsics (#2627)
Analyzer intentionally "ignores" intrinsics which linker recognizes, but analyzer doesn't yet. Meaning it will not produce any warnings due to them.
Some tests didn't reflect this change correctly.
Diffstat (limited to 'test/Mono.Linker.Tests.Cases')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/DataFlow/ApplyTypeAnnotations.cs | 3 | ||||
-rw-r--r-- | test/Mono.Linker.Tests.Cases/DataFlow/ComplexTypeHandling.cs | 9 |
2 files changed, 0 insertions, 12 deletions
diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/ApplyTypeAnnotations.cs b/test/Mono.Linker.Tests.Cases/DataFlow/ApplyTypeAnnotations.cs index c08adf35d..7f0b80a44 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/ApplyTypeAnnotations.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/ApplyTypeAnnotations.cs @@ -51,9 +51,6 @@ namespace Mono.Linker.Tests.Cases.DataFlow } [Kept] - // Analyzer doesn't track known types: https://github.com/dotnet/linker/issues/2273 - [ExpectedWarning ("IL2072", "'type'", nameof (ApplyTypeAnnotations) + "." + nameof (RequireCombination) + "(Type)", "System.Type.GetType(String)", - ProducedBy = ProducedBy.Analyzer)] static void TestFromTypeGetTypeOverConstant () { RequireCombination (Type.GetType ("Mono.Linker.Tests.Cases.DataFlow.ApplyTypeAnnotations+FromTypeGetTypeOverConstantTestType")); diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/ComplexTypeHandling.cs b/test/Mono.Linker.Tests.Cases/DataFlow/ComplexTypeHandling.cs index 51cce5f2c..7bcfbc70c 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/ComplexTypeHandling.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/ComplexTypeHandling.cs @@ -99,9 +99,6 @@ namespace Mono.Linker.Tests.Cases.DataFlow } [Kept] - // Analyzer doesn't support intrinsics: https://github.com/dotnet/linker/issues/2374 - [ExpectedWarning ("IL2072", "'type'", nameof (ComplexTypeHandling) + "." + nameof (RequirePublicMethods) + "(Type)", "System.Object.GetType()", - ProducedBy = ProducedBy.Analyzer)] static void TestArrayGetTypeFromMethodParamHelper (ArrayGetTypeFromMethodParamElement[] p) { RequirePublicMethods (p.GetType ()); @@ -124,9 +121,6 @@ namespace Mono.Linker.Tests.Cases.DataFlow static ArrayGetTypeFromFieldElement[] _arrayGetTypeFromField; [Kept] - // Analyzer doesn't support intrinsics: https://github.com/dotnet/linker/issues/2374 - [ExpectedWarning ("IL2072", "'type'", nameof (ComplexTypeHandling) + "." + nameof (RequirePublicMethods) + "(Type)", "System.Object.GetType()", - ProducedBy = ProducedBy.Analyzer)] static void TestArrayGetTypeFromField () { RequirePublicMethods (_arrayGetTypeFromField.GetType ()); @@ -140,9 +134,6 @@ namespace Mono.Linker.Tests.Cases.DataFlow } [Kept] - // Analyzer doesn't track known types: https://github.com/dotnet/linker/issues/2273 - [ExpectedWarning ("IL2072", "'type'", nameof (ComplexTypeHandling) + "." + nameof (RequirePublicMethods) + "(Type)", "System.Type.GetType(String)", - ProducedBy = ProducedBy.Analyzer)] static void TestArrayTypeGetType () { RequirePublicMethods (Type.GetType ("Mono.Linker.Tests.Cases.DataFlow.ComplexTypeHandling+ArrayTypeGetTypeElement[]")); |