Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
eff5223a
Commit
eff5223a
authored
Nov 02, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Add a test for marshalling of floats on x86-64.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
55b1c430
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
tmarshal.c
dlls/oleaut32/tests/tmarshal.c
+17
-0
tmarshal.idl
dlls/oleaut32/tests/tmarshal.idl
+4
-0
No files found.
dlls/oleaut32/tests/tmarshal.c
View file @
eff5223a
...
...
@@ -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
.
0
f
,
"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
.
0
f
,
"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
);
...
...
@@ -1361,6 +1372,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
,
...
...
@@ -1780,6 +1792,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
.
0
f
,
2
.
0
,
3
,
4
.
0
f
,
5
.
0
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
}
static
void
test_marshal_pointer
(
IWidget
*
widget
,
IDispatch
*
disp
)
...
...
dlls/oleaut32/tests/tmarshal.idl
View file @
eff5223a
...
...
@@ -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
,
...
...
@@ -246,6 +247,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
)
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment