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

[netcore] Make System.Reflection.Tests.AssemblyTests.CrossAssemblyTypeRefToNestedType Pass #15347

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

Comments

@steveisok
Copy link
Contributor

@steveisok steveisok commented Jun 21, 2019

The test currently fails with:

System.Reflection.Tests.AssemblyTests.CrossAssemblyTypeRefToNestedType [FAIL]
      Assert.Equal() Failure
      Expected: typeof(Outer+Inner)
      Actual:   typeof(Outer+Inner+ReallyInner)
      Stack Trace:
           at System.Reflection.Tests.AssemblyTests.CrossAssemblyTypeRefToNestedType()
           at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Determine why and make the test pass.

@lambdageek lambdageek added this to Needs triage in .NET Core Loader via automation Jun 27, 2019
.NET Core Loader automation moved this from Needs triage to Resolved: Closed Jul 11, 2019
akoeplinger added 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
.NET Core Loader
Resolved: Closed
1 participant
You can’t perform that action at this time.