Exemple #1
0
    private static void TestEnumReverse()
    {
        ThisCallNative.C c      = CreateCWithManagedVTable(2.0f, 3.0f);
        ThisCallNative.E result = ThisCallNative.GetEFromManaged(&c);

        Assert.AreEqual(c.dummy, result);
    }
Exemple #2
0
    private static void Test4ByteHFAReverse()
    {
        ThisCallNative.C     c      = CreateCWithManagedVTable(2.0f, 3.0f);
        ThisCallNative.Width result = ThisCallNative.GetWidthFromManaged(&c);

        Assert.AreEqual(c.width, result.width);
    }
Exemple #3
0
    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);
    }
Exemple #4
0
    private static void TestCLongUnmanagedCallersOnly()
    {
        ThisCallNative.C c      = CreateCWithUnmanagedCallersOnlyVTable(2.0f, 3.0f);
        CLong            result = ThisCallNative.GetWidthAsLongFromManaged(&c);

        Assert.Equal((nint)c.width, result.Value);
    }
Exemple #5
0
    private static void TestEnumUnmanagedCallersOnly()
    {
        ThisCallNative.C c      = CreateCWithUnmanagedCallersOnlyVTable(2.0f, 3.0f);
        ThisCallNative.E result = ThisCallNative.GetEFromManaged(&c);

        Assert.Equal(c.dummy, result);
    }
Exemple #6
0
    private static void Test4ByteHFAUnmanagedCallersOnly()
    {
        ThisCallNative.C     c      = CreateCWithUnmanagedCallersOnlyVTable(2.0f, 3.0f);
        ThisCallNative.Width result = ThisCallNative.GetWidthFromManaged(&c);

        Assert.Equal(c.width, result.width);
    }
    private static void TestCLongReverse()
    {
        ThisCallNative.C c = CreateCWithManagedVTable(2.0f, 3.0f);
        CLong result = ThisCallNative.GetWidthAsLongFromManaged(&c);

        Assert.AreEqual((nint)c.width, result.Value);
    }
Exemple #8
0
    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);
    }