From ce14638c046c4abe388a6848a3eb19c0ec11dc38 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 8 Jul 2005 04:08:17 +0000 Subject: r8217: added testing of echo_TestSleep() and echo_TestEnum() in echo js code (This used to be commit 7fa9b8251dbab9482268f84dd98889123a9219e7) --- testprogs/ejs/echo.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'testprogs') diff --git a/testprogs/ejs/echo.js b/testprogs/ejs/echo.js index 019242fd33..8cdacf8fc6 100644 --- a/testprogs/ejs/echo.js +++ b/testprogs/ejs/echo.js @@ -152,6 +152,43 @@ function test_TestCall2(conn) } } +/* + test the echo_TestSleep interface +*/ +function test_TestSleep(conn) +{ + var io = irpcObj(); + + print("Testing echo_TestSleep\n"); + + io.input.seconds = 1; + status = dcerpc_echo_TestSleep(conn, io); + check_status_ok(status); +} + +/* + test the echo_TestEnum interface +*/ +function test_TestEnum(conn) +{ + var io = irpcObj(); + + print("Testing echo_TestEnum\n"); + + io.input.foo1 = 1; + io.input.foo2 = new Object(); + io.input.foo2.e1 = 1; + io.input.foo2.e2 = 1; + io.input.foo3 = new Object(); + io.input.foo3.e1 = 2; + status = dcerpc_echo_TestEnum(conn, io); + check_status_ok(status); + assert(io.output.foo1 == 1); + assert(io.output.foo2.e1 == 2); + assert(io.output.foo2.e2 == 1); + assert(io.output.foo3.e1 == 2); +} + if (ARGV.length == 0) { print("Usage: echo.js \n"); @@ -174,5 +211,7 @@ test_SinkData(conn); test_SourceData(conn); test_TestCall(conn); test_TestCall2(conn); +test_TestSleep(conn); +test_TestEnum(conn); print("All OK\n"); -- cgit