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
f6c4c49f
Commit
f6c4c49f
authored
Mar 19, 2010
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Add tests for a complex array of pointers.
parent
3ae8d588
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
server.c
dlls/rpcrt4/tests/server.c
+19
-0
server.idl
dlls/rpcrt4/tests/server.idl
+3
-0
No files found.
dlls/rpcrt4/tests/server.c
View file @
f6c4c49f
...
@@ -283,6 +283,15 @@ s_sum_var_array(int x[20], int n)
...
@@ -283,6 +283,15 @@ s_sum_var_array(int x[20], int n)
}
}
int
int
s_sum_complex_array
(
int
n
,
refpint_t
pi
[])
{
int
total
=
0
;
for
(;
n
>
0
;
n
--
)
total
+=
*
pi
[
n
-
1
];
return
total
;
}
int
s_dot_two_vectors
(
vector_t
vs
[
2
])
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
;
return
vs
[
0
].
x
*
vs
[
1
].
x
+
vs
[
0
].
y
*
vs
[
1
].
y
+
vs
[
0
].
z
*
vs
[
1
].
z
;
...
@@ -1213,6 +1222,7 @@ array_tests(void)
...
@@ -1213,6 +1222,7 @@ array_tests(void)
int
*
pi
;
int
*
pi
;
pints_t
api
[
5
];
pints_t
api
[
5
];
numbers_struct_t
*
ns
;
numbers_struct_t
*
ns
;
refpint_t
rpi
[
5
];
if
(
!
old_windows_version
)
if
(
!
old_windows_version
)
{
{
...
@@ -1317,6 +1327,15 @@ array_tests(void)
...
@@ -1317,6 +1327,15 @@ array_tests(void)
HeapFree
(
GetProcessHeap
(),
0
,
ns
);
HeapFree
(
GetProcessHeap
(),
0
,
ns
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
pi
);
HeapFree
(
GetProcessHeap
(),
0
,
pi
);
pi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
5
*
sizeof
(
*
pi
));
pi
[
0
]
=
3
;
rpi
[
0
]
=
&
pi
[
0
];
pi
[
1
]
=
5
;
rpi
[
1
]
=
&
pi
[
1
];
pi
[
2
]
=
-
2
;
rpi
[
2
]
=
&
pi
[
2
];
pi
[
3
]
=
-
1
;
rpi
[
3
]
=
&
pi
[
3
];
pi
[
4
]
=
-
4
;
rpi
[
4
]
=
&
pi
[
4
];
ok
(
sum_complex_array
(
5
,
rpi
)
==
1
,
"RPC sum_complex_array
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
pi
);
}
}
void
void
...
...
dlls/rpcrt4/tests/server.idl
View file @
f6c4c49f
...
@@ -120,6 +120,8 @@ cpp_quote("#endif")
...
@@ -120,6 +120,8 @@ cpp_quote("#endif")
} u;
} u;
} test_list_t;
} test_list_t;
typedef [ref] int *refpint_t;
int test_list_length(test_list_t *ls);
int test_list_length(test_list_t *ls);
int sum_fixed_int_3d(int m[2][3][4]);
int sum_fixed_int_3d(int m[2][3][4]);
int sum_conf_array([size_is(n)] int x[], int n);
int sum_conf_array([size_is(n)] int x[], int n);
...
@@ -154,6 +156,7 @@ cpp_quote("#endif")
...
@@ -154,6 +156,7 @@ cpp_quote("#endif")
int sum_cs(cs_t *cs);
int sum_cs(cs_t *cs);
int sum_cps(cps_t *cps);
int sum_cps(cps_t *cps);
int sum_cpsc(cpsc_t *cpsc);
int sum_cpsc(cpsc_t *cpsc);
int sum_complex_array(int n, refpint_t pi[n]);
typedef [wire_marshal(int)] void *puint_t;
typedef [wire_marshal(int)] void *puint_t;
int square_puint(puint_t p);
int square_puint(puint_t p);
...
...
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