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
a05923e1
Commit
a05923e1
authored
Dec 24, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Add tests for varying and conformant varying arrays.
parent
a38cd7ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
server.c
dlls/rpcrt4/tests/server.c
+44
-0
server.idl
dlls/rpcrt4/tests/server.idl
+2
-0
No files found.
dlls/rpcrt4/tests/server.c
View file @
a05923e1
...
...
@@ -595,6 +595,32 @@ s_context_handle_test(void)
}
void
s_get_5numbers
(
int
count
,
pints_t
n
[
5
])
{
int
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
n
[
i
].
pi
=
midl_user_allocate
(
sizeof
(
*
n
[
i
].
pi
));
*
n
[
i
].
pi
=
i
;
n
[
i
].
ppi
=
NULL
;
n
[
i
].
pppi
=
NULL
;
}
}
void
s_get_numbers
(
int
length
,
int
size
,
pints_t
n
[])
{
int
i
;
for
(
i
=
0
;
i
<
length
;
i
++
)
{
n
[
i
].
pi
=
midl_user_allocate
(
sizeof
(
*
n
[
i
].
pi
));
*
n
[
i
].
pi
=
i
;
n
[
i
].
ppi
=
NULL
;
n
[
i
].
pppi
=
NULL
;
}
}
void
s_stop
(
void
)
{
ok
(
RPC_S_OK
==
RpcMgmtStopServerListening
(
NULL
),
"RpcMgmtStopServerListening
\n
"
);
...
...
@@ -1029,6 +1055,8 @@ array_tests(void)
int
n
;
int
ca
[
5
]
=
{
1
,
-
2
,
3
,
-
4
,
5
};
doub_carr_t
*
dc
;
int
*
pi
;
pints_t
api
[
5
];
ok
(
cstr_length
(
str1
,
sizeof
str1
)
==
strlen
(
str1
),
"RPC cstr_length
\n
"
);
...
...
@@ -1103,6 +1131,22 @@ array_tests(void)
free_pyramid_doub_carr
(
dc
);
ok
(
sum_L1_norms
(
2
,
vs
)
==
21
,
"RPC sum_L1_norms
\n
"
);
memset
(
api
,
0
,
sizeof
(
api
));
pi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
pi
));
*
pi
=
-
1
;
api
[
0
].
pi
=
pi
;
get_5numbers
(
1
,
api
);
todo_wine
ok
(
api
[
0
].
pi
==
pi
,
"RPC varying array [out] pointer changed from %p to %p
\n
"
,
pi
,
api
[
0
].
pi
);
ok
(
*
api
[
0
].
pi
==
0
,
"pi unmarshalled incorrectly %d
\n
"
,
*
pi
);
api
[
0
].
pi
=
pi
;
get_numbers
(
1
,
1
,
api
);
todo_wine
ok
(
api
[
0
].
pi
==
pi
,
"RPC conformant varying array [out] pointer changed from %p to %p
\n
"
,
pi
,
api
[
0
].
pi
);
ok
(
*
api
[
0
].
pi
==
0
,
"pi unmarshalled incorrectly %d
\n
"
,
*
pi
);
HeapFree
(
GetProcessHeap
(),
0
,
pi
);
}
static
void
...
...
dlls/rpcrt4/tests/server.idl
View file @
a05923e1
...
...
@@ -300,6 +300,8 @@ cpp_quote("#endif")
int sum_pcarr2(int n, [size_is(, n)] int **pa);
int sum_L1_norms(int n, [size_is(n)] vector_t *vs);
void get_5numbers([in] int count, [out, length_is(count)] pints_t pn[5]);
void get_numbers([in] int length, [in] int size, [out, length_is(length), size_is(size)] pints_t pn[]);
str_t get_filename(void);
void context_handle_test(void);
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