Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/oleaut32/tests/tmarshal.c | 17 +++++++++++++++++ dlls/oleaut32/tests/tmarshal.idl | 4 ++++ 2 files changed, 21 insertions(+)
diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index 96663d177b..1b6ba14325 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -981,6 +981,17 @@ static HRESULT WINAPI Widget_basetypes_out(IWidget *iface, signed char *c, short return S_OK; }
+static HRESULT WINAPI Widget_float_abi(IWidget *iface, float f, double d, int i, float f2, double d2) +{ + ok(f == 1.0f, "Got float %f.\n", f); + ok(d == 2.0, "Got double %f.\n", d); + ok(i == 3, "Got int %d.\n", i); + ok(f2 == 4.0f, "Got float %f.\n", f2); + ok(d2 == 5.0, "Got double %f.\n", d2); + + return S_OK; +} + static HRESULT WINAPI Widget_int_ptr(IWidget *iface, int *in, int *out, int *in_out) { ok(*in == 123, "Got [in] %d.\n", *in); @@ -1375,6 +1386,7 @@ static const struct IWidgetVtbl Widget_VTable = Widget_Coclass, Widget_basetypes_in, Widget_basetypes_out, + Widget_float_abi, Widget_int_ptr, Widget_int_ptr_ptr, Widget_iface_in, @@ -1795,6 +1807,11 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp) pi = &i2; hr = IWidget_myint(widget, 123, &i, &pi); ok(hr == S_OK, "Got hr %#x.\n", hr); + + /* Test that different float ABIs are correctly handled. */ + + hr = IWidget_float_abi(widget, 1.0f, 2.0, 3, 4.0f, 5.0); + ok(hr == S_OK, "Got hr %#x.\n", hr); }
static void test_marshal_pointer(IWidget *widget, IDispatch *disp) diff --git a/dlls/oleaut32/tests/tmarshal.idl b/dlls/oleaut32/tests/tmarshal.idl index a8a947da9f..6e427a4d8d 100644 --- a/dlls/oleaut32/tests/tmarshal.idl +++ b/dlls/oleaut32/tests/tmarshal.idl @@ -53,6 +53,7 @@ enum IWidget_dispids
DISPID_TM_BASETYPES_IN, DISPID_TM_BASETYPES_OUT, + DISPID_TM_FLOAT_ABI, DISPID_TM_INT_PTR, DISPID_TM_INT_PTR_PTR, DISPID_TM_IFACE_IN, @@ -247,6 +248,9 @@ library TestTypelib [out] unsigned char *uc, [out] unsigned short *us, [out] unsigned int *ui, [out] unsigned hyper *uh, [out] float *f, [out] double *d, [out] STATE *st);
+ [id(DISPID_TM_FLOAT_ABI)] + HRESULT float_abi([in] float f, [in] double d, [in] int i, [in] float f2, [in] double d2); + [id(DISPID_TM_INT_PTR)] HRESULT int_ptr([in] int *in, [out] int *out, [in, out] int *in_out);