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
d9b66725
Commit
d9b66725
authored
Aug 16, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Aug 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Add tests for NdrAllocate.
parent
2eaefc34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
ndr_marshall.c
dlls/rpcrt4/tests/ndr_marshall.c
+43
-0
No files found.
dlls/rpcrt4/tests/ndr_marshall.c
View file @
d9b66725
...
...
@@ -901,10 +901,53 @@ static void test_client_init(void)
}
static
void
test_ndr_allocate
(
void
)
{
RPC_MESSAGE
RpcMessage
;
MIDL_STUB_MESSAGE
StubMsg
;
MIDL_STUB_DESC
StubDesc
;
void
*
p1
,
*
p2
;
struct
tag_mem_list_t
{
DWORD
magic
;
void
*
ptr
;
struct
tag_mem_list_t
*
next
;
}
*
mem_list
;
const
DWORD
magic_MEML
=
'M'
<<
24
|
'E'
<<
16
|
'M'
<<
8
|
'L'
;
StubDesc
=
Object_StubDesc
;
NdrClientInitializeNew
(
&
RpcMessage
,
&
StubMsg
,
&
StubDesc
,
0
);
ok
(
StubMsg
.
pMemoryList
==
NULL
,
"memlist %p
\n
"
,
StubMsg
.
pMemoryList
);
my_alloc_called
=
my_free_called
=
0
;
p1
=
NdrAllocate
(
&
StubMsg
,
10
);
p2
=
NdrAllocate
(
&
StubMsg
,
20
);
ok
(
my_alloc_called
==
2
,
"alloc called %d
\n
"
,
my_alloc_called
);
mem_list
=
StubMsg
.
pMemoryList
;
todo_wine
{
ok
(
mem_list
!=
NULL
,
"mem_list NULL
\n
"
);
}
if
(
mem_list
)
{
ok
(
mem_list
->
magic
==
magic_MEML
,
"magic %08lx
\n
"
,
mem_list
->
magic
);
ok
(
mem_list
->
ptr
==
p2
,
"ptr != p2
\n
"
);
ok
(
mem_list
->
next
!=
NULL
,
"next NULL
\n
"
);
mem_list
=
mem_list
->
next
;
if
(
mem_list
)
{
ok
(
mem_list
->
magic
==
magic_MEML
,
"magic %08lx
\n
"
,
mem_list
->
magic
);
ok
(
mem_list
->
ptr
==
p1
,
"ptr != p2
\n
"
);
ok
(
mem_list
->
next
==
NULL
,
"next %p
\n
"
,
mem_list
->
next
);
}
}
/* NdrFree isn't exported so we can't test free'ing */
}
START_TEST
(
ndr_marshall
)
{
test_simple_types
();
test_simple_struct
();
test_fullpointer_xlat
();
test_client_init
();
test_ndr_allocate
();
}
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