mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-09 09:34:49 +09:00
Add extra Module.ModuleHandle test (#72875)
* Add extra Module.ModuleHandle test * Update src/libraries/System.Runtime/tests/System/Reflection/ModuleTests.cs Co-authored-by: Jan Kotas <jkotas@microsoft.com> * Fix mono implementation Co-authored-by: Jan Kotas <jkotas@microsoft.com>
This commit is contained in:
parent
490d3ceccc
commit
93900881bc
3 changed files with 5 additions and 0 deletions
|
@ -54,6 +54,7 @@ namespace System.Reflection.Tests
|
|||
public void ModuleHandle()
|
||||
{
|
||||
Assert.Equal(typeof(PointerTests).Module.ModuleHandle, Module.ModuleHandle);
|
||||
Assert.NotEqual(typeof(PointerTests).Module.ModuleHandle, System.ModuleHandle.EmptyHandle);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
@ -775,6 +775,8 @@ namespace System.Reflection.Emit
|
|||
|
||||
internal IntPtr GetUnderlyingNativeHandle() { return _impl; }
|
||||
|
||||
protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(_impl);
|
||||
|
||||
[RequiresUnreferencedCode("Methods might be removed")]
|
||||
protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers)
|
||||
{
|
||||
|
|
|
@ -394,6 +394,8 @@ namespace System.Reflection
|
|||
|
||||
internal IntPtr GetUnderlyingNativeHandle() { return _impl; }
|
||||
|
||||
protected override ModuleHandle GetModuleHandleImpl() => new ModuleHandle(_impl);
|
||||
|
||||
// This calls ves_icall_reflection_get_token, so needs a Module argument
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
internal static extern int get_MetadataToken(Module module);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue