Skip to content
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 @@ -26,6 +26,7 @@
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
<ItemGroup>
<Compile Include="UnitTestGenericArgumentTests.cs" />
<Compile Include="UnitTestGenericReflectionTests.cs" />
<Compile Include="UnitTestNullable.cs" />
<Compile Include="UnitTestReflectionInvokeTests.cs" />
<Compile Include="UnitTestReflectionAssemblyTest.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,13 @@ public void Invoke_ConstructorParameter_IsCompared()
}

[TestMethod]
public void Invoke_ParameterStillNamingT_IsNotSupported()
public void Invoke_ParameterNamingTheOwnerArgument_IsResolvedFromTheClosedType()
{
MethodInfo mi = typeof(GaO<int>).GetMethod("TakesSelf");

Assert.ThrowsException(typeof(NotSupportedException), () => { mi.Invoke(new GaO<int>(), new object[] { new GaO<int>() }); });
Assert.ThrowsException(typeof(NotSupportedException), () => { mi.Invoke(new GaO<int>(), new object[] { null }); });
Assert.AreEqual(1, (int)mi.Invoke(new GaO<int>(), new object[] { new GaO<int>() }));
Assert.AreEqual(1, (int)mi.Invoke(new GaO<int>(), new object[] { null }));
Assert.ThrowsException(typeof(InvalidCastException), () => { mi.Invoke(new GaO<int>(), new object[] { new GaO<string>() }); });
}

// FieldInfo.SetValue
Expand Down
Loading
Loading