-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Again adjust for culture name normalization in AssemblyNameInfoFuzzer #114531
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
base: main
Are you sure you want to change the base?
Conversation
@MihuBot fuzz AssemblyNameInfo |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/libraries/System.Reflection.Metadata/tests/Metadata/AssemblyNameInfoTests.cs:111
- [nitpick] Consider adding additional test cases with more complex culture names (e.g., multiple '-' characters) to ensure the normalization behavior is robust for various inputs.
public static IEnumerable<object[]> CultureNameGetLoweredByToAssemblyName_Arguments()
|
||
string lowerCase = fromTryParse.CultureName.ToLower(); | ||
if (lowerCase != "c") | ||
{ | ||
Assert.Equal(lowerCase, fromParse.ToAssemblyName().CultureName); | ||
Assert.Equal(lowerCase, fromParse.ToAssemblyName().CultureName!.ToLower()); |
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.
The simplified normalization by lower-casing the entire culture name is clear in the test; consider verifying that this approach continues to cover all relevant scenarios with culture names that might have more than one '-' character.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Tagging subscribers to this area: @dotnet/area-system-reflection-metadata |
#114231 was not enough, as only characters before
-
get lowered:runtime/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs
Line 743 in 778427c
The issue was not discovered by our public fuzzing infra in #114328 (comment)