[2/3] widl: Test structure argument marshalling
Dan Hipschman
dsh at linux.ucla.edu
Wed Jun 13 18:14:08 CDT 2007
This adds a test for marshalling of structure arguments (only pointers
to structures worked before).
---
dlls/rpcrt4/tests/server.c | 7 +++++++
dlls/rpcrt4/tests/server.idl | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index fbaa755..7b8e48a 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -232,6 +232,12 @@ s_square_puint(puint_t p)
return n * n;
}
+int
+s_dot_copy_vectors(vector_t u, vector_t v)
+{
+ return u.x * v.x + u.y * v.y + u.z * v.z;
+}
+
void
s_stop(void)
{
@@ -342,6 +348,7 @@ basic_tests(void)
ok(ptypes_sum(&ptypes) == 33.0, "RPC ptypes_sum\n");
ok(dot_pvectors(&pvecs) == -21, "RPC dot_pvectors\n");
+ ok(dot_copy_vectors(vec1, vec2) == -21, "RPC dot_copy_vectors\n");
ok(sum_fixed_array(f) == -2, "RPC sum_fixed_array\n");
ok(sum_sp(&sp) == 29, "RPC sum_sp\n");
}
diff --git a/dlls/rpcrt4/tests/server.idl b/dlls/rpcrt4/tests/server.idl
index d6ed5f2..40ed67d 100644
--- a/dlls/rpcrt4/tests/server.idl
+++ b/dlls/rpcrt4/tests/server.idl
@@ -132,5 +132,6 @@ interface IServer
typedef [wire_marshal(int)] void *puint_t;
int square_puint(puint_t p);
+ int dot_copy_vectors(vector_t u, vector_t v);
void stop(void);
}
More information about the wine-patches
mailing list