svn commit: samba r8218 - in branches/SAMBA_4_0/testprogs/ejs: .
tridge at samba.org
tridge at samba.org
Fri Jul 8 04:16:36 GMT 2005
Author: tridge
Date: 2005-07-08 04:16:36 +0000 (Fri, 08 Jul 2005)
New Revision: 8218
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8218
Log:
added testing of echo_TestSurrounding() and
echo_TestDoublePointer(). All echo.idl functions are now tested and
working from ejs.
Modified:
branches/SAMBA_4_0/testprogs/ejs/echo.js
Changeset:
Modified: branches/SAMBA_4_0/testprogs/ejs/echo.js
===================================================================
--- branches/SAMBA_4_0/testprogs/ejs/echo.js 2005-07-08 04:08:17 UTC (rev 8217)
+++ branches/SAMBA_4_0/testprogs/ejs/echo.js 2005-07-08 04:16:36 UTC (rev 8218)
@@ -49,6 +49,16 @@
}
/*
+ check that an array is all zeros
+*/
+function check_array_zero(a)
+{
+ for (i=0; i<a.length; i++) {
+ assert(a[i] == 0);
+ }
+}
+
+/*
test the echo_AddOne interface
*/
function test_AddOne(conn)
@@ -189,7 +199,40 @@
assert(io.output.foo3.e1 == 2);
}
+/*
+ test the echo_TestSurrounding interface
+*/
+function test_TestSurrounding(conn)
+{
+ var io = irpcObj();
+ print("Testing echo_TestSurrounding\n");
+
+ io.input.data = new Object();
+ io.input.data.x = 10;
+ io.input.data.surrounding = ramp_array(10);
+ status = dcerpc_echo_TestSurrounding(conn, io);
+ check_status_ok(status);
+ assert(io.output.data.surrounding.length == 20);
+ check_array_zero(io.output.data.surrounding);
+}
+
+/*
+ test the echo_TestDoublePointer interface
+*/
+function test_TestDoublePointer(conn)
+{
+ var io = irpcObj();
+
+ print("Testing echo_TestDoublePointer\n");
+
+ io.input.data = 7;
+ status = dcerpc_echo_TestDoublePointer(conn, io);
+ check_status_ok(status);
+ assert(io.input.data == io.input.data);
+}
+
+
if (ARGV.length == 0) {
print("Usage: echo.js <RPCBINDING>\n");
exit(0);
@@ -213,5 +256,7 @@
test_TestCall2(conn);
test_TestSleep(conn);
test_TestEnum(conn);
+test_TestSurrounding(conn);
+test_TestDoublePointer(conn);
print("All OK\n");
More information about the samba-cvs
mailing list