-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Create separate attribute for warning behavior differences #101220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jtschuster
merged 10 commits into
dotnet:main
from
jtschuster:UseLinkedExpectedWarningAttributes
Apr 26, 2024
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
43fec84
Create separate attribute for warning behavior differences
jtschuster 6f171ec
Unify ExpectedWarning and ExpectedMissingWarning and update test code…
jtschuster 429a445
Merge branch 'main' into UseLinkedExpectedWarningAttributes
jtschuster 8f8dc6f
Remove new ProducedBy usages from main
jtschuster 5def1fb
Remove commented 'ProducedBy' usages
jtschuster 0344f79
Clean up Result/TestChecker code and undo extra formatting
jtschuster 5181b4a
Merge branch 'main' of https://github.com/dotnet/runtime into UseLink…
jtschuster 06ac8c9
Remove commented code, remove unused ctor
jtschuster 3ac5ff1
Merge branch 'main' into UseLinkedExpectedWarningAttributes
jtschuster d2f6f2d
Merge branch 'main' into UseLinkedExpectedWarningAttributes
jtschuster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...illink/test/Mono.Linker.Tests.Cases.Expectations/Assertions/UnexpectedWarningAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) .NET Foundation and contributors. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System; | ||
|
||
namespace Mono.Linker.Tests.Cases.Expectations.Assertions | ||
{ | ||
[AttributeUsage ( | ||
AttributeTargets.Assembly | AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Constructor | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Event, | ||
AllowMultiple = true, | ||
Inherited = false)] | ||
/// <summary> | ||
/// An attribute applied to a member to indicate that a warning is raised in tests, but should not be present in ideal behavior | ||
/// </summary> | ||
public class UnexpectedWarningAttribute : ExpectedWarningAttribute | ||
{ | ||
public UnexpectedWarningAttribute (string warningCode, string[] messageContains, Tool producedBy, string issueLinkOrReason) | ||
: base (warningCode, messageContains, producedBy, issueLinkOrReason) { } | ||
public UnexpectedWarningAttribute (string warningCode, string messageContains, Tool producedBy, string issueLinkOrReason) | ||
: base (warningCode, messageContains, producedBy, issueLinkOrReason) { } | ||
public UnexpectedWarningAttribute (string warningCode, string messageContains, string messageContains2, Tool producedBy, string issueLinkOrReason) | ||
: base (warningCode, messageContains, messageContains2, producedBy, issueLinkOrReason) { } | ||
public UnexpectedWarningAttribute (string warningCode, Tool producedBy, string issueLinkOrReason) | ||
: base (warningCode, producedBy, issueLinkOrReason) { } | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ public static void Unused () | |
{ | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.