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
78d75e4a
Commit
78d75e4a
authored
Jan 25, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4/tests: Add context handle marshaling tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
464ba54b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
server.c
dlls/rpcrt4/tests/server.c
+40
-1
server.idl
dlls/rpcrt4/tests/server.idl
+8
-0
No files found.
dlls/rpcrt4/tests/server.c
View file @
78d75e4a
...
...
@@ -141,6 +141,9 @@ static void (__cdecl *stop_autolisten)(void);
static
void
(
__cdecl
*
ip_test
)(
ipu_t
*
a
);
static
int
(
__cdecl
*
sum_ptr_array
)(
int
*
a
[
2
]);
static
int
(
__cdecl
*
sum_array_ptr
)(
int
(
*
a
)[
2
]);
static
ctx_handle_t
__cdecl
(
*
get_handle
)(
void
);
static
void
(
__cdecl
*
get_handle_by_ptr
)(
ctx_handle_t
*
r
);
static
void
(
__cdecl
*
test_handle
)(
ctx_handle_t
ctx_handle
);
#define SERVER_FUNCTIONS \
X(int_return) \
...
...
@@ -228,7 +231,10 @@ static int (__cdecl *sum_array_ptr)(int (*a)[2]);
X(stop_autolisten) \
X(ip_test) \
X(sum_ptr_array) \
X(sum_array_ptr)
X(sum_array_ptr) \
X(get_handle) \
X(get_handle_by_ptr) \
X(test_handle)
/* type check statements generated in header file */
fnprintf
*
p_printf
=
printf
;
...
...
@@ -1068,6 +1074,26 @@ int __cdecl s_sum_array_ptr(int (*a)[2])
return
(
*
a
)[
0
]
+
(
*
a
)[
1
];
}
ctx_handle_t
__cdecl
s_get_handle
(
void
)
{
return
(
ctx_handle_t
)
0xdeadbeef
;
}
void
__cdecl
s_get_handle_by_ptr
(
ctx_handle_t
*
r
)
{
*
r
=
(
ctx_handle_t
)
0xdeadbeef
;
}
void
__cdecl
s_test_handle
(
ctx_handle_t
ctx_handle
)
{
ok
(
ctx_handle
==
(
ctx_handle_t
)
0xdeadbeef
,
"Unexpected ctx_handle %p
\n
"
,
ctx_handle
);
}
void
__RPC_USER
ctx_handle_t_rundown
(
ctx_handle_t
ctx_handle
)
{
ok
(
ctx_handle
==
(
ctx_handle_t
)
0xdeadbeef
,
"Unexpected ctx_handle %p
\n
"
,
ctx_handle
);
}
static
void
make_cmdline
(
char
buffer
[
MAX_PATH
],
const
char
*
test
)
{
...
...
@@ -1809,6 +1835,18 @@ void __cdecl s_authinfo_test(unsigned int protseq, int secure)
}
}
static
void
test_handle_return
(
void
)
{
ctx_handle_t
handle
,
handle2
;
if
(
!
is_interp
)
return
;
/* broken in widl */
handle
=
get_handle
();
test_handle
(
handle
);
get_handle_by_ptr
(
&
handle2
);
test_handle
(
handle2
);
}
static
void
run_tests
(
void
)
{
...
...
@@ -1817,6 +1855,7 @@ run_tests(void)
pointer_tests
();
array_tests
();
context_handle_test
();
test_handle_return
();
}
static
void
...
...
dlls/rpcrt4/tests/server.idl
View file @
78d75e4a
...
...
@@ -446,4 +446,12 @@ cpp_quote("#endif")
int
sum_ptr_array
(
[
in
]
int
*
a
[
2
]
)
;
int
sum_array_ptr
(
[
in
]
int
(
*
a
)
[
2
]
)
;
cpp_quote
(
"#ifndef SKIP_STRUCT_DECLS"
)
typedef
[
context_handle
]
void
*
ctx_handle_t
;
cpp_quote
(
"#endif"
)
ctx_handle_t
get_handle
()
;
void
get_handle_by_ptr
(
[
out
]
ctx_handle_t
*
r
)
;
void
test_handle
(
ctx_handle_t
ctx_handle
)
;
}
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