Dan Hipschman : rpcrt4: Add a testcase for RPCs with fixed-size
arrays.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Apr 26 10:23:59 CDT 2007
Module: wine
Branch: master
Commit: ba17c25e62970340a67d0e15d818694d87143fcb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ba17c25e62970340a67d0e15d818694d87143fcb
Author: Dan Hipschman <dsh at linux.ucla.edu>
Date: Wed Apr 25 18:22:10 2007 -0700
rpcrt4: Add a testcase for RPCs with fixed-size arrays.
---
dlls/rpcrt4/tests/server.c | 9 +++++++++
dlls/rpcrt4/tests/server.idl | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index 9fef738..51c570e 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -108,6 +108,12 @@ s_square_half_long(long x, long *y)
return x * x;
}
+int
+s_sum_fixed_array(int a[5])
+{
+ return a[0] + a[1] + a[2] + a[3] + a[4];
+}
+
void
s_stop(void)
{
@@ -147,6 +153,7 @@ static void
basic_tests(void)
{
static char string[] = "I am a string";
+ static int f[5] = {1, 3, 0, -2, -4};
static vector_t a = {1, 3, 7};
double u, v;
float s, t;
@@ -183,6 +190,8 @@ basic_tests(void)
q = square_half_long(3, &r);
ok(q == 9, "RPC square_half_long\n");
ok(r == 1, "RPC square_half_long\n");
+
+ ok(sum_fixed_array(f) == -2, "RPC sum_fixed_array\n");
}
static void
diff --git a/dlls/rpcrt4/tests/server.idl b/dlls/rpcrt4/tests/server.idl
index d42a3a9..c122870 100644
--- a/dlls/rpcrt4/tests/server.idl
+++ b/dlls/rpcrt4/tests/server.idl
@@ -41,5 +41,6 @@ interface IServer
double square_half(double x, [out] double *y);
float square_half_float(float x, [out] float *y);
long square_half_long(long x, [out] long *y);
+ int sum_fixed_array(int a[5]);
void stop(void);
}
More information about the wine-cvs
mailing list