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

tridge at samba.org tridge at samba.org
Wed Aug 17 02:56:07 GMT 2005


Author: tridge
Date: 2005-08-17 02:56:07 +0000 (Wed, 17 Aug 2005)
New Revision: 9345

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

Log:

used the data blob functions in the echo.js test code

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-08-17 02:55:31 UTC (rev 9344)
+++ branches/SAMBA_4_0/testprogs/ejs/echo.js	2005-08-17 02:56:07 UTC (rev 9345)
@@ -22,10 +22,11 @@
 function ramp_array(N)
 {
 	var a = new Array(N);
+	var data = datablob_init();
 	for (i=0;i<N;i++) {
 		a[i] = i;
 	}
-	return a;
+	return data.blobFromArray(a);
 }
 
 
@@ -60,7 +61,7 @@
 		io.input.in_data = ramp_array(i);
 		status = echo.echo_EchoData(io);
 		check_status_ok(status);
-		check_array_equal(io.input.in_data, io.output.out_data);
+		assert(true == echo.blobCompare(io.input.in_data, io.output.out_data));
 	}
 }
 
@@ -97,7 +98,7 @@
 		status = echo.echo_SourceData(io);
 		check_status_ok(status);
 		correct = ramp_array(i);
-		check_array_equal(correct, io.output.data);
+		assert(true == echo.blobCompare(correct, io.output.data));
 	}
 }
 
@@ -181,7 +182,7 @@
 	
 	io.input.data = new Object();
 	io.input.data.x = 10;
-	io.input.data.surrounding = ramp_array(10);
+	io.input.data.surrounding = new Array(10);
 	status = echo.echo_TestSurrounding(io);
 	check_status_ok(status);
 	assert(io.output.data.surrounding.length == 20);
@@ -210,6 +211,7 @@
 }
 var binding = options.ARGV[0];
 var echo = rpcecho_init();
+datablob_init(echo);
 
 print("Connecting to " + binding + "\n");
 status = echo.connect(binding);



More information about the samba-cvs mailing list