Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
18c16a80
Commit
18c16a80
authored
Nov 01, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Nov 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Add a test for the pointers in [in,out] pointer structs not changing…
rpcrt4: Add a test for the pointers in [in,out] pointer structs not changing when the pointers aren't NULL.
parent
55aeb80a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
server.c
dlls/rpcrt4/tests/server.c
+19
-0
server.idl
dlls/rpcrt4/tests/server.idl
+7
-0
No files found.
dlls/rpcrt4/tests/server.c
View file @
18c16a80
...
...
@@ -472,6 +472,16 @@ s_hash_bstr(bstr_t b)
}
void
s_get_name
(
name_t
*
name
)
{
const
char
bossman
[]
=
"Jeremy White"
;
memcpy
(
name
->
name
,
bossman
,
min
(
name
->
size
,
sizeof
(
bossman
)));
/* ensure nul-termination */
if
(
name
->
size
<
sizeof
(
bossman
))
name
->
name
[
name
->
size
-
1
]
=
0
;
}
void
s_stop
(
void
)
{
ok
(
RPC_S_OK
==
RpcMgmtStopServerListening
(
NULL
),
"RpcMgmtStopServerListening
\n
"
);
...
...
@@ -800,6 +810,8 @@ pointer_tests(void)
cpuints_t
cpus
;
short
bstr_data
[]
=
{
5
,
'H'
,
'e'
,
'l'
,
'l'
,
'o'
};
bstr_t
bstr
=
&
bstr_data
[
1
];
name_t
name
;
void
*
buffer
;
ok
(
test_list_length
(
list
)
==
3
,
"RPC test_list_length
\n
"
);
ok
(
square_puint
(
p1
)
==
121
,
"RPC square_puint
\n
"
);
...
...
@@ -843,6 +855,13 @@ pointer_tests(void)
ok
(
hash_bstr
(
bstr
)
==
s_hash_bstr
(
bstr
),
"RPC hash_bstr_data
\n
"
);
free_list
(
list
);
name
.
size
=
10
;
name
.
name
=
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
name
.
size
);
get_name
(
&
name
);
todo_wine
ok
(
name
.
name
==
buffer
,
"[in,out] pointer should have stayed as %p but instead changed to %p
\n
"
,
name
.
name
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
name
.
name
);
}
static
int
...
...
dlls/rpcrt4/tests/server.idl
View file @
18c16a80
...
...
@@ -290,5 +290,12 @@ cpp_quote("#endif")
typedef [wire_marshal(wire_bstr_t)] short *bstr_t;
unsigned hash_bstr(bstr_t s);
typedef struct
{
[string, size_is(size)] char *name;
unsigned int size;
} name_t;
void get_name([in,out] name_t *name);
void stop(void);
}
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