diff options
author | Mateo Torres-Ruiz <mateoatr@users.noreply.github.com> | 2021-07-31 02:18:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 02:18:00 +0300 |
commit | acd72ce63588a6cb5005787938282e56fd207d3a (patch) | |
tree | 039dac73c2d1697e6f0fc2c13bd2aba82ed1a9c5 /test/Mono.Linker.Tests.Cases | |
parent | aec70d0ae5a5d304176bb9831f5ffdb6e13d3568 (diff) |
Share DiagnosticStrings add mechanism to generate a DiagnosticDescriptor given a DiagnosticId (#2170)
* Add DiagnosticId enum
Add GetDiagnosticDescriptor
* Check that the diagnostic id is in the range of the supported linker warnings
* Lint
* Share DiagnosticString
* Noisy whitespace
* Warnings go up to 6000 inclusive
* PR feedback
* Get diagnostic string
Update test
* Lint
* PR feedback
Diffstat (limited to 'test/Mono.Linker.Tests.Cases')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/DataFlow/VirtualMethodHierarchyDataflowAnnotationValidation.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/Mono.Linker.Tests.Cases/DataFlow/VirtualMethodHierarchyDataflowAnnotationValidation.cs b/test/Mono.Linker.Tests.Cases/DataFlow/VirtualMethodHierarchyDataflowAnnotationValidation.cs index 25107c005..4e59e09b4 100644 --- a/test/Mono.Linker.Tests.Cases/DataFlow/VirtualMethodHierarchyDataflowAnnotationValidation.cs +++ b/test/Mono.Linker.Tests.Cases/DataFlow/VirtualMethodHierarchyDataflowAnnotationValidation.cs @@ -271,9 +271,13 @@ namespace Mono.Linker.Tests.Cases.DataFlow // === RequiresUnreferencedCode === - [ExpectedWarning ("IL2046", "DerivedClass.RequiresUnreferencedCodeBaseWithDerivedWithout()", "BaseClass.RequiresUnreferencedCodeBaseWithDerivedWithout()")] + [ExpectedWarning ("IL2046", "DerivedClass.RequiresUnreferencedCodeBaseWithDerivedWithout()", + "BaseClass.RequiresUnreferencedCodeBaseWithDerivedWithout()", + "'RequiresUnreferencedCodeAttribute' annotations must match across all interface implementations or overrides")] public override void RequiresUnreferencedCodeBaseWithDerivedWithout () { } - [ExpectedWarning ("IL2046", "DerivedClass.RequiresUnreferencedCodeBaseWithoutDerivedWith_()", "BaseClass.RequiresUnreferencedCodeBaseWithoutDerivedWith_()")] + [ExpectedWarning ("IL2046", "DerivedClass.RequiresUnreferencedCodeBaseWithoutDerivedWith_()", + "BaseClass.RequiresUnreferencedCodeBaseWithoutDerivedWith_()", + "'RequiresUnreferencedCodeAttribute' annotations must match across all interface implementations or overrides")] [RequiresUnreferencedCode ("")] public override void RequiresUnreferencedCodeBaseWithoutDerivedWith_ () { } [LogDoesNotContain ("DerivedClass.RequiresUnreferencedCodeBaseWithDerivedWith_")] |