diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases.Expectations')
-rw-r--r-- | test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedWarningAttribute.cs | 7 | ||||
-rw-r--r-- | test/Mono.Linker.Tests.Cases.Expectations/Assertions/ProducedBy.cs | 16 |
2 files changed, 21 insertions, 2 deletions
diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedWarningAttribute.cs b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedWarningAttribute.cs index 5f2fc633e..02376d513 100644 --- a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedWarningAttribute.cs +++ b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedWarningAttribute.cs @@ -16,8 +16,11 @@ namespace Mono.Linker.Tests.Cases.Expectations.Assertions public int SourceLine { get; set; } public int SourceColumn { get; set; } - // Set to true if the warning only applies to global analysis (ILLinker, as opposed to Roslyn Analyzer) - public bool GlobalAnalysisOnly { get; set; } + /// <summary> + /// Property used by the result checkers of trimmer and analyzers to determine whether + /// the tool should have produced the specified warning on the annotated member. + /// </summary> + public ProducedBy ProducedBy { get; set; } = ProducedBy.TrimmerAndAnalyzer; public bool CompilerGeneratedCode { get; set; } } diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ProducedBy.cs b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ProducedBy.cs new file mode 100644 index 000000000..1277f897b --- /dev/null +++ b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ProducedBy.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Mono.Linker.Tests.Cases.Expectations.Assertions +{ + [Flags] + public enum ProducedBy + { + Trimmer = 1, + Analyzer = 2, + TrimmerAndAnalyzer = Trimmer | Analyzer + } +}
\ No newline at end of file |