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
9d4e79e3
Commit
9d4e79e3
authored
Jul 27, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4/tests: Add a test about unmarshalling of an out-only structure.
parent
093547e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
server.c
dlls/rpcrt4/tests/server.c
+26
-0
server.idl
dlls/rpcrt4/tests/server.idl
+1
-0
No files found.
dlls/rpcrt4/tests/server.c
View file @
9d4e79e3
...
...
@@ -340,6 +340,19 @@ int __cdecl s_sum_cpsc(cpsc_t *cpsc)
return
sum
;
}
int
__cdecl
s_get_cpsc
(
int
n
,
cpsc_t
*
cpsc
)
{
static
int
array
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
int
i
,
ret
;
cpsc
->
ca
=
array
;
cpsc
->
a
=
min
(
10
,
2
*
n
);
cpsc
->
b
=
2
;
cpsc
->
c
=
1
;
for
(
i
=
ret
=
0
;
i
<
cpsc
->
a
;
i
++
)
ret
+=
cpsc
->
ca
[
i
];
return
ret
;
}
int
__cdecl
s_square_puint
(
puint_t
p
)
{
int
n
=
atoi
(
p
);
...
...
@@ -1226,6 +1239,7 @@ array_tests(void)
cs_t
*
cs
;
int
n
;
int
ca
[
5
]
=
{
1
,
-
2
,
3
,
-
4
,
5
};
int
tmp
[
10
];
doub_carr_t
*
dc
;
int
*
pi
;
pints_t
api
[
5
];
...
...
@@ -1293,6 +1307,18 @@ array_tests(void)
cpsc
.
ca
=
c
;
ok
(
sum_cpsc
(
&
cpsc
)
==
10
,
"RPC sum_cpsc
\n
"
);
cpsc
.
ca
=
NULL
;
ok
(
get_cpsc
(
5
,
&
cpsc
)
==
45
,
"RPC sum_cpsc
\n
"
);
ok
(
cpsc
.
a
==
10
,
"RPC get_cpsc %u
\n
"
,
cpsc
.
a
);
for
(
n
=
0
;
n
<
10
;
n
++
)
ok
(
cpsc
.
ca
[
n
]
==
n
,
"RPC get_cpsc[%d] = %d
\n
"
,
n
,
cpsc
.
ca
[
n
]
);
memset
(
tmp
,
0x33
,
sizeof
(
tmp
)
);
cpsc
.
ca
=
tmp
;
ok
(
get_cpsc
(
4
,
&
cpsc
)
==
28
,
"RPC sum_cpsc
\n
"
);
ok
(
cpsc
.
a
==
8
,
"RPC get_cpsc %u
\n
"
,
cpsc
.
a
);
ok
(
cpsc
.
ca
==
tmp
,
"RPC get_cpsc %p/%p
\n
"
,
cpsc
.
ca
,
tmp
);
for
(
n
=
0
;
n
<
8
;
n
++
)
ok
(
cpsc
.
ca
[
n
]
==
n
,
"RPC get_cpsc[%d] = %d
\n
"
,
n
,
cpsc
.
ca
[
n
]
);
ok
(
sum_toplev_conf_2n
(
c
,
3
)
==
15
,
"RPC sum_toplev_conf_2n
\n
"
);
ok
(
sum_toplev_conf_cond
(
c
,
5
,
6
,
1
)
==
10
,
"RPC sum_toplev_conf_cond
\n
"
);
ok
(
sum_toplev_conf_cond
(
c
,
5
,
6
,
0
)
==
15
,
"RPC sum_toplev_conf_cond
\n
"
);
...
...
dlls/rpcrt4/tests/server.idl
View file @
9d4e79e3
...
...
@@ -162,6 +162,7 @@ cpp_quote("#endif")
int sum_cs(cs_t *cs);
int sum_cps(cps_t *cps);
int sum_cpsc(cpsc_t *cpsc);
int get_cpsc(int n, [out] cpsc_t *cpsc );
int sum_complex_array(int n, [size_is(n)] refpint_t pi[]);
typedef [wire_marshal(int)] void *puint_t;
...
...
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