コード例 #1
0
ファイル: ThisCallTest.cs プロジェクト: trieshard/runtime
    private static void TestEnumReverse()
    {
        ThisCallNative.C c      = CreateCWithManagedVTable(2.0f, 3.0f);
        ThisCallNative.E result = ThisCallNative.GetEFromManaged(&c);

        Assert.AreEqual(c.dummy, result);
    }
コード例 #2
0
ファイル: ThisCallTest.cs プロジェクト: trieshard/runtime
    private static void Test4ByteHFAReverse()
    {
        ThisCallNative.C     c      = CreateCWithManagedVTable(2.0f, 3.0f);
        ThisCallNative.Width result = ThisCallNative.GetWidthFromManaged(&c);

        Assert.AreEqual(c.width, result.width);
    }
コード例 #3
0
ファイル: ThisCallTest.cs プロジェクト: trieshard/runtime
    private static void Test4ByteNonHFAReverse()
    {
        ThisCallNative.C          c      = CreateCWithManagedVTable(2.0f, 3.0f);
        ThisCallNative.IntWrapper result = ThisCallNative.GetHeightAsIntFromManaged(&c);

        Assert.AreEqual((int)c.height, result.i);
    }
コード例 #4
0
ファイル: ThisCallTest.cs プロジェクト: z77ma/runtime
    private static void TestCLongUnmanagedCallersOnly()
    {
        ThisCallNative.C c      = CreateCWithUnmanagedCallersOnlyVTable(2.0f, 3.0f);
        CLong            result = ThisCallNative.GetWidthAsLongFromManaged(&c);

        Assert.Equal((nint)c.width, result.Value);
    }
コード例 #5
0
ファイル: ThisCallTest.cs プロジェクト: z77ma/runtime
    private static void TestEnumUnmanagedCallersOnly()
    {
        ThisCallNative.C c      = CreateCWithUnmanagedCallersOnlyVTable(2.0f, 3.0f);
        ThisCallNative.E result = ThisCallNative.GetEFromManaged(&c);

        Assert.Equal(c.dummy, result);
    }
コード例 #6
0
ファイル: ThisCallTest.cs プロジェクト: z77ma/runtime
    private static void Test4ByteHFAUnmanagedCallersOnly()
    {
        ThisCallNative.C     c      = CreateCWithUnmanagedCallersOnlyVTable(2.0f, 3.0f);
        ThisCallNative.Width result = ThisCallNative.GetWidthFromManaged(&c);

        Assert.Equal(c.width, result.width);
    }
コード例 #7
0
    private static void TestCLongReverse()
    {
        ThisCallNative.C c = CreateCWithManagedVTable(2.0f, 3.0f);
        CLong result = ThisCallNative.GetWidthAsLongFromManaged(&c);

        Assert.AreEqual((nint)c.width, result.Value);
    }
コード例 #8
0
ファイル: ThisCallTest.cs プロジェクト: trieshard/runtime
    private static void Test8ByteHFAReverse()
    {
        ThisCallNative.C     c      = CreateCWithManagedVTable(2.0f, 3.0f);
        ThisCallNative.SizeF result = ThisCallNative.GetSizeFromManaged(&c);

        Assert.AreEqual(c.width, result.width);
        Assert.AreEqual(c.height, result.height);
    }