svn commit: samba r8197 - in branches/SAMBA_4_0/testprogs/ejs: .

tridge at samba.org tridge at samba.org
Thu Jul 7 07:47:30 GMT 2005


Author: tridge
Date: 2005-07-07 07:47:30 +0000 (Thu, 07 Jul 2005)
New Revision: 8197

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8197

Log:
added testing of echo_SinkData() and echo_SourceData()

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-07 07:43:45 UTC (rev 8196)
+++ branches/SAMBA_4_0/testprogs/ejs/echo.js	2005-07-07 07:47:30 UTC (rev 8197)
@@ -16,7 +16,7 @@
 {
 	var a = new Array(N);
 	for (i=0;i<N;i++) {
-		a[i] = i+1;
+		a[i] = i;
 	}
 	return a;
 }
@@ -81,6 +81,45 @@
 	}
 }
 
+
+/*
+  test the echo_SinkData interface
+*/
+function test_SinkData(conn)
+{
+	var status;
+	var io = irpcObj();
+
+	print("Testing echo_SinkData\n");
+
+	for (i=0; i<30; i=i+5) {
+		io.input.len = i;
+		io.input.data = ramp_array(i);
+		status = dcerpc_echo_SinkData(conn, io);
+		check_status_ok(status);
+	}
+}
+
+
+/*
+  test the echo_SourceData interface
+*/
+function test_SourceData(conn)
+{
+	var status;
+	var io = irpcObj();
+
+	print("Testing echo_SourceData\n");
+
+	for (i=0; i<30; i=i+5) {
+		io.input.len = i;
+		status = dcerpc_echo_SourceData(conn, io);
+		check_status_ok(status);
+		correct = ramp_array(i);
+		check_array_equal(correct, io.output.data);
+	}
+}
+
 if (ARGV.length == 0) {
    print("Usage: echo.js <RPCBINDING>\n");
    exit(0);
@@ -98,5 +137,7 @@
 
 test_AddOne(conn);
 test_EchoData(conn);
+test_SinkData(conn);
+test_SourceData(conn);
 
 print("All OK\n");



More information about the samba-cvs mailing list