-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add AssemblyExtensions.GetApplyUpdateCapabilities method #51954
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,5 +39,19 @@ public static void ApplyUpdateInvalidParameters() | |
AssemblyExtensions.ApplyUpdate(typeof(AssemblyExtensions).Assembly, new ReadOnlySpan<byte>(metadataDelta), new ReadOnlySpan<byte>(ilDelta), ReadOnlySpan<byte>.Empty)); | ||
} | ||
} | ||
|
||
[Fact] | ||
public void GetApplyUpdateCapabilitiesIsCallable() | ||
{ | ||
var ty = typeof(System.Reflection.Metadata.AssemblyExtensions); | ||
var mi = ty.GetMethod("GetApplyUpdateCapabilities", BindingFlags.NonPublic | BindingFlags.Static, Array.Empty<Type>()); | ||
|
||
Assert.NotNull(mi); | ||
|
||
var result = mi.Invoke(null, null); | ||
|
||
Assert.NotNull(result); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's bit odd to check for notnull if the return value is not declared as nullable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nullable annotations are just a suggestions. They do not guarantee any behavior. We have similar checks in many other tests.
lambdageek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Assert.Equal(typeof(string), result.GetType()); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the
Debugger.IsSupported
feature switch for now? That's what we did forMetadataUpdateHandlerAttribute
.runtime/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml
Lines 33 to 36 in 636988a
I can put a PR to fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened #51994