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
1ff4bfe6
Commit
1ff4bfe6
authored
Mar 23, 2010
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Add test for [out] non-conformant array.
parent
0ec617e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
server.c
dlls/rpcrt4/tests/server.c
+14
-0
server.idl
dlls/rpcrt4/tests/server.idl
+1
-0
No files found.
dlls/rpcrt4/tests/server.c
View file @
1ff4bfe6
...
...
@@ -297,6 +297,14 @@ s_dot_two_vectors(vector_t vs[2])
return
vs
[
0
].
x
*
vs
[
1
].
x
+
vs
[
0
].
y
*
vs
[
1
].
y
+
vs
[
0
].
z
*
vs
[
1
].
z
;
}
void
s_get_number_array
(
int
x
[
20
],
int
*
n
)
{
int
c
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
memcpy
(
x
,
c
,
sizeof
(
c
));
*
n
=
sizeof
(
c
)
/
sizeof
(
c
[
0
]);
}
int
s_sum_cs
(
cs_t
*
cs
)
{
...
...
@@ -1212,6 +1220,7 @@ array_tests(void)
};
int
c
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
int
c2
[]
=
{
10
,
100
,
200
};
int
c3
[
20
];
vector_t
vs
[
2
]
=
{{
1
,
-
2
,
3
},
{
4
,
-
5
,
-
6
}};
cps_t
cps
;
cpsc_t
cpsc
;
...
...
@@ -1246,6 +1255,11 @@ array_tests(void)
ok
(
sum_unique_conf_ptr
(
ca
,
5
)
==
3
,
"RPC sum_unique_conf_array
\n
"
);
ok
(
sum_unique_conf_ptr
(
NULL
,
10
)
==
0
,
"RPC sum_unique_conf_array
\n
"
);
get_number_array
(
c3
,
&
n
);
ok
(
n
==
10
,
"RPC get_num_array
\n
"
);
for
(;
n
>
0
;
n
--
)
ok
(
c3
[
n
-
1
]
==
c
[
n
-
1
],
"get_num_array returned wrong value %d @ %d
\n
"
,
c3
[
n
-
1
],
n
);
ok
(
sum_var_array
(
c
,
10
)
==
45
,
"RPC sum_conf_array
\n
"
);
ok
(
sum_var_array
(
&
c
[
5
],
2
)
==
11
,
"RPC sum_conf_array
\n
"
);
ok
(
sum_var_array
(
&
c
[
7
],
1
)
==
7
,
"RPC sum_conf_array
\n
"
);
...
...
dlls/rpcrt4/tests/server.idl
View file @
1ff4bfe6
...
...
@@ -130,6 +130,7 @@ cpp_quote("#endif")
int sum_unique_conf_ptr([size_is(n), unique] int *x, int n);
int sum_var_array([length_is(n)] int x[20], int n);
int dot_two_vectors(vector_t vs[2]);
void get_number_array([out, length_is(*n)] int x[20], [out] int *n);
typedef struct
{
...
...
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