diff options
author | Jackson Schuster <jschuster@microsoft.com> | 2021-12-13 22:15:13 +0300 |
---|---|---|
committer | Jackson Schuster <jschuster@microsoft.com> | 2021-12-13 22:33:31 +0300 |
commit | 6a83b625eba3e5da09061f19e83870a600f0177d (patch) | |
tree | 4ae590824ea403916c28d538ae099aa5f1de19a5 /test | |
parent | 101be87537cf872a762a40c7c5ed8862dba8c72a (diff) |
Analyzer properly emits IL2109, but has a '.' in paths where the linker has a '/'
Diffstat (limited to 'test')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/RequiresCapability/RequiresCapability.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Mono.Linker.Tests.Cases/RequiresCapability/RequiresCapability.cs b/test/Mono.Linker.Tests.Cases/RequiresCapability/RequiresCapability.cs index 0d2bcdcf5..68a25e7f3 100644 --- a/test/Mono.Linker.Tests.Cases/RequiresCapability/RequiresCapability.cs +++ b/test/Mono.Linker.Tests.Cases/RequiresCapability/RequiresCapability.cs @@ -1227,7 +1227,9 @@ namespace Mono.Linker.Tests.Cases.RequiresCapability public static void MethodWithRequires () { } } - [ExpectedWarning ("IL2109", "RequiresOnClass/DerivedWithoutRequires", "RequiresOnClass.ClassWithRequires", "--ClassWithRequires--")] + [ExpectedWarning ("IL2109", "RequiresOnClass/DerivedWithoutRequires", "RequiresOnClass.ClassWithRequires", "--ClassWithRequires--", ProducedBy = ProducedBy.Trimmer)] + [ExpectedWarning ("IL2109", "RequiresOnClass.DerivedWithoutRequires", "RequiresOnClass.ClassWithRequires", "--ClassWithRequires--", ProducedBy = ProducedBy.Analyzer)] + private class DerivedWithoutRequires : ClassWithRequires { public static void StaticMethodInInheritedClass () { } @@ -1400,6 +1402,8 @@ namespace Mono.Linker.Tests.Cases.RequiresCapability // A nested class is not considered a static method nor constructor therefore RequiresUnreferencedCode doesnt apply // and this warning is not suppressed [ExpectedWarning ("IL2109", "RequiresOnClass/DerivedWithRequires2/DerivedNestedClass", "--ClassWithRequires--", ProducedBy = ProducedBy.Trimmer)] + [ExpectedWarning ("IL2109", "RequiresOnClass.DerivedWithRequires2.DerivedNestedClass", "--ClassWithRequires--", ProducedBy = ProducedBy.Analyzer)] + public class DerivedNestedClass : ClassWithRequires { public static void NestedStaticMethod () { } @@ -1630,6 +1634,7 @@ namespace Mono.Linker.Tests.Cases.RequiresCapability } [ExpectedWarning ("IL2109", "ReflectionAccessOnCtor/DerivedWithoutRequires", "ReflectionAccessOnCtor.BaseWithRequires", ProducedBy = ProducedBy.Trimmer)] + [ExpectedWarning ("IL2109", "ReflectionAccessOnCtor.DerivedWithoutRequires", "ReflectionAccessOnCtor.BaseWithRequires", ProducedBy = ProducedBy.Analyzer)] class DerivedWithoutRequires : BaseWithRequires { [ExpectedWarning ("IL2026", "--BaseWithRequires--", ProducedBy = ProducedBy.Trimmer)] // The body has direct call to the base.ctor() @@ -1704,6 +1709,7 @@ namespace Mono.Linker.Tests.Cases.RequiresCapability } [ExpectedWarning ("IL2109", "ReflectionAccessOnField/DerivedWithoutRequires", "ReflectionAccessOnField.WithRequires", ProducedBy = ProducedBy.Trimmer)] + [ExpectedWarning ("IL2109", "ReflectionAccessOnField.DerivedWithoutRequires", "ReflectionAccessOnField.WithRequires", ProducedBy = ProducedBy.Analyzer)] class DerivedWithoutRequires : WithRequires { public static int DerivedStaticField; @@ -1828,6 +1834,7 @@ namespace Mono.Linker.Tests.Cases.RequiresCapability } [ExpectedWarning ("IL2109", "ReflectionAccessOnProperties/DerivedWithoutRequires", "ReflectionAccessOnProperties.WithRequires", ProducedBy = ProducedBy.Trimmer)] + [ExpectedWarning ("IL2109", "ReflectionAccessOnProperties.DerivedWithoutRequires", "ReflectionAccessOnProperties.WithRequires", ProducedBy = ProducedBy.Analyzer)] class DerivedWithoutRequires : WithRequires { public static int DerivedStaticProperty { get; set; } |