Skip to content
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

Enable test that already fixed #70065

Merged
merged 3 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ModuleBuilderDefineType
{
public static IEnumerable<object[]> TestData()
{
foreach (string name in new string[] { "TestName", "testname", "class", "\uD800\uDC00", "a\0b\0c" })
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out it was failing on mono only for "a\0b\0c" case and @GrabYourPitchforks suggested to remove it as it is not valid scenario to test

foreach (string name in new string[] { "TestName", "testname", "class", "\uD800\uDC00" })
{
foreach (TypeAttributes attributes in new TypeAttributes[] { TypeAttributes.NotPublic, TypeAttributes.Interface | TypeAttributes.Abstract, TypeAttributes.Class })
{
Expand Down
7 changes: 3 additions & 4 deletions src/libraries/System.Reflection.Emit/tests/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ public static void VerifyType(TypeBuilder type, Module module, TypeBuilder decla
Assert.Equal(type.AsType().GetNestedTypes(AllFlags), createdType.GetNestedTypes(AllFlags));
Assert.Equal(type.AsType().GetNestedType(name, AllFlags), createdType.GetNestedType(name, AllFlags));

// [ActiveIssue("https://github.com/dotnet/runtime/issues/18231", TestPlatforms.AnyUnix)]
// Assert.Equal(createdType, module.GetType(name, true, true));
// Assert.Equal(createdType, module.GetType(name.ToLowerInvariant(), true, true));
// Assert.Equal(createdType, module.GetType(name.ToUpperInvariant(), true, true));
Assert.Equal(createdType, module.GetType(name, true, true));
Assert.Equal(createdType, module.GetType(name.ToLowerInvariant(), true, true));
Assert.Equal(createdType, module.GetType(name.ToUpperInvariant(), true, true));
}
}

Expand Down