Skip to content

Commit

Permalink
Added more test case. #104
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed Oct 20, 2021
1 parent b159b49 commit 65ebbbe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ public class InstanceMultipleImplement3DepthType : InstanceMultipleImplement2Dep
[TestId("TypeRelations")]
[TestCase("223", "InstanceImplement", 123, IncludeTypes = new[] { typeof(InstanceImplementType), typeof(IInterfaceType1) })]
[TestCase("223", "InstanceImplementFromInterface", 123, IncludeTypes = new[] { typeof(InstanceImplementType), typeof(IInterfaceType1) })]
[TestCase("223", "InstanceImplementFromInterfaceByClass", 123, IncludeTypes = new[] { typeof(InstanceImplementType), typeof(IInterfaceType1) })]
[TestCase("223", "InstanceImplementExplicitlyTypeFromInterface", 123, IncludeTypes = new[] { typeof(InstanceImplementExplicitlyType), typeof(IInterfaceType1) })]
[TestCase("223", "InstanceImplementExplicitlyTypeFromInterfaceByClass", 123, IncludeTypes = new[] { typeof(InstanceImplementExplicitlyType), typeof(IInterfaceType1) })]
[TestCase("223", "InstanceMultipleImplement1", 123, IncludeTypes = new[] { typeof(InstanceMultipleImplementType), typeof(IInterfaceType1), typeof(IInterfaceType2) })]
Expand Down Expand Up @@ -307,6 +308,9 @@ public static string InstanceImplementFromInterface(int value)
return inst.GetStringFromInt32(value);
}

[MethodImpl(MethodImplOptions.ForwardRef)]
public static extern string InstanceImplementFromInterfaceByClass(int value);

public static string InstanceImplementExplicitlyTypeFromInterface(int value)
{
IInterfaceType1 inst = new InstanceImplementExplicitlyType();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
.class public IL2C.RuntimeSystems.TypeImplements
{
.method public static string InstanceImplementFromInterfaceByClass(int32 v) cil managed
{
.maxstack 2
newobj instance void IL2C.RuntimeSystems.InstanceImplementType::.ctor()
ldarg.0
callvirt instance string IL2C.RuntimeSystems.IInterfaceType1::GetStringFromInt32(int32)
ret
}
.method public static string InstanceImplementExplicitlyTypeFromInterfaceByClass(int32 v) cil managed
{
.maxstack 2
Expand Down

0 comments on commit 65ebbbe

Please sign in to comment.