-
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
Fix typo in AssemblyName handling #69157
Conversation
Fix typo in AssemblyName handling and add test that catches the bug introduced by the typo
Tagging subscribers to this area: @dotnet/area-system-reflection Issue DetailsFix typo in AssemblyName handling and add test that catches the bug introduced by the typo
|
Assembly a = Assembly.Load(an); | ||
|
||
byte[] publicKey = a.GetName().GetPublicKey(); | ||
Assert.True(publicKey.Length > 0); |
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.
do the public key and PKT have defined lengths (eg., 8 and 160) and if so, could we assert the lengths of each here?
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, they do. We have AssemblyName tests that verify that.
This test only requires that the public key and public key token are non-empty to cover the desired scenario.
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.
LGTM
Fix typo in AssemblyName handling and add test that catches the bug introduced by the typo