Skip to content

[netcore] Make System.Reflection.Tests.TypeTests_HiddenFields.GetFieldDoesNotHideHiddenFields Pass #15348

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

Closed
steveisok opened this issue Jun 21, 2019 · 0 comments · Fixed by #15641

Comments

@steveisok
Copy link
Contributor

The test currently fails with:

System.Reflection.Tests.TypeTests_HiddenFields.GetFieldDoesNotHideHiddenFields [FAIL]
      Assert.Equal() Failure
      Expected: 4
      Actual:   0
      Stack Trace:
           at System.Reflection.Tests.TypeTests_HiddenFields.GetFieldDoesNotHideHiddenFields()
           at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Determine why and make the test pass.

akoeplinger pushed a commit that referenced this issue Jul 11, 2019
Mono used to return `true` for these three cases (see System.Reflection.Tests.TypeTests.IsAssignableFrom tests):
```csharp
using System.Reflection;
using Xunit;

namespace ConsoleApp
{
    public static class Program
    {
        static void Main(string[] args)
        {
            Assert.False(typeof(TI_Interface1[]).GetTypeInfo().IsAssignableFrom(
                         typeof(TI_StructWithInterface[]).GetTypeInfo()));

            Assert.False(typeof(int?[]).GetTypeInfo().IsAssignableFrom(
                         typeof(int[]).GetTypeInfo()));

            Assert.False(typeof(int[]).GetTypeInfo().IsAssignableFrom(
                         typeof(int?[]).GetTypeInfo()));
            
        }
    }
    
    public interface TI_Interface1 { }
    public struct TI_StructWithInterface : TI_Interface1 { }
}
```
Fixes #10848
Fixes #15080

Unrelated  System.Reflection.MetadataLoadContext.Tests tests that don't fail anymore:
Close #15351
Close #15348
Close #15347
Close #15346
Close #15345
Close #15343
Close #15342
Close #15341
Close #15338
Close #15337
Close #15336
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy