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
55b1c430
Commit
55b1c430
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 some tests for marshalling public typedefs.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b6bee083
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
tmarshal.c
dlls/oleaut32/tests/tmarshal.c
+18
-1
tmarshal.idl
dlls/oleaut32/tests/tmarshal.idl
+6
-0
No files found.
dlls/oleaut32/tests/tmarshal.c
View file @
55b1c430
...
@@ -1314,6 +1314,14 @@ static HRESULT WINAPI Widget_mystruct_array(IWidget *iface, MYSTRUCT in[2])
...
@@ -1314,6 +1314,14 @@ static HRESULT WINAPI Widget_mystruct_array(IWidget *iface, MYSTRUCT in[2])
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
Widget_myint
(
IWidget
*
iface
,
myint_t
val
,
myint_t
*
ptr
,
myint_t
**
ptr_ptr
)
{
ok
(
val
==
123
,
"Got value %d.
\n
"
,
val
);
ok
(
*
ptr
==
456
,
"Got single ptr ref %d.
\n
"
,
*
ptr
);
ok
(
**
ptr_ptr
==
789
,
"Got double ptr ref %d.
\n
"
,
**
ptr_ptr
);
return
S_OK
;
}
static
const
struct
IWidgetVtbl
Widget_VTable
=
static
const
struct
IWidgetVtbl
Widget_VTable
=
{
{
Widget_QueryInterface
,
Widget_QueryInterface
,
...
@@ -1368,6 +1376,7 @@ static const struct IWidgetVtbl Widget_VTable =
...
@@ -1368,6 +1376,7 @@ static const struct IWidgetVtbl Widget_VTable =
Widget_array
,
Widget_array
,
Widget_variant_array
,
Widget_variant_array
,
Widget_mystruct_array
,
Widget_mystruct_array
,
Widget_myint
,
};
};
static
HRESULT
WINAPI
StaticWidget_QueryInterface
(
IStaticWidget
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
static
HRESULT
WINAPI
StaticWidget_QueryInterface
(
IStaticWidget
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
...
@@ -1689,7 +1698,7 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp)
...
@@ -1689,7 +1698,7 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp)
signed
char
c
;
signed
char
c
;
short
s
;
short
s
;
int
i
;
int
i
,
i2
,
*
pi
;
hyper
h
;
hyper
h
;
unsigned
char
uc
;
unsigned
char
uc
;
unsigned
short
us
;
unsigned
short
us
;
...
@@ -1763,6 +1772,14 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp)
...
@@ -1763,6 +1772,14 @@ static void test_marshal_basetypes(IWidget *widget, IDispatch *disp)
ok
(
f
==
(
float
)
M_LN2
,
"Got float %f.
\n
"
,
f
);
ok
(
f
==
(
float
)
M_LN2
,
"Got float %f.
\n
"
,
f
);
ok
(
d
==
M_LN10
,
"Got double %f.
\n
"
,
d
);
ok
(
d
==
M_LN10
,
"Got double %f.
\n
"
,
d
);
ok
(
st
==
STATE_UNWIDGETIFIED
,
"Got state %u.
\n
"
,
st
);
ok
(
st
==
STATE_UNWIDGETIFIED
,
"Got state %u.
\n
"
,
st
);
/* Test marshalling of public typedefs. */
i
=
456
;
i2
=
789
;
pi
=
&
i2
;
hr
=
IWidget_myint
(
widget
,
123
,
&
i
,
&
pi
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
}
}
static
void
test_marshal_pointer
(
IWidget
*
widget
,
IDispatch
*
disp
)
static
void
test_marshal_pointer
(
IWidget
*
widget
,
IDispatch
*
disp
)
...
...
dlls/oleaut32/tests/tmarshal.idl
View file @
55b1c430
...
@@ -68,6 +68,7 @@ enum IWidget_dispids
...
@@ -68,6 +68,7 @@ enum IWidget_dispids
DISPID_TM_ARRAY
,
DISPID_TM_ARRAY
,
DISPID_TM_VARIANT_ARRAY
,
DISPID_TM_VARIANT_ARRAY
,
DISPID_TM_STRUCT_ARRAY
,
DISPID_TM_STRUCT_ARRAY
,
DISPID_TM_TYPEDEF
,
}
;
}
;
static
const
int
DISPID_TM_NEG_RESTRICTED
=
-
26
;
static
const
int
DISPID_TM_NEG_RESTRICTED
=
-
26
;
...
@@ -100,6 +101,8 @@ library TestTypelib
...
@@ -100,6 +101,8 @@ library TestTypelib
UINT
uarr
[
8
]
;
UINT
uarr
[
8
]
;
}
MYSTRUCT
;
}
MYSTRUCT
;
typedef
[
public
]
int
myint_t
;
coclass
ApplicationObject2
;
coclass
ApplicationObject2
;
[
[
...
@@ -295,6 +298,9 @@ library TestTypelib
...
@@ -295,6 +298,9 @@ library TestTypelib
[
id
(
DISPID_TM_STRUCT_ARRAY
)
]
[
id
(
DISPID_TM_STRUCT_ARRAY
)
]
HRESULT
mystruct_array
(
[
in
]
MYSTRUCT
in
[
2
]
)
;
HRESULT
mystruct_array
(
[
in
]
MYSTRUCT
in
[
2
]
)
;
[
id
(
DISPID_TM_TYPEDEF
)
]
HRESULT
myint
(
[
in
]
myint_t
val
,
[
in
]
myint_t
*
ptr
,
[
in
]
myint_t
**
ptr_ptr
)
;
}
}
[
[
...
...
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