Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adamsitnik
Copy link
Member

#114231 was not enough, as only characters before - get lowered:

The issue was not discovered by our public fuzzing infra in #114328 (comment)

@adamsitnik
Copy link
Member Author

@MihuBot fuzz AssemblyNameInfo

Copy link
Contributor

@Copilot Copilot AI left a 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());
Copy link
Preview

Copilot AI Apr 11, 2025

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.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-reflection-metadata
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants