summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-17 02:56:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:33:26 -0500
commita533f398aa1fb8d95fa8aab9bc80fe277abb3384 (patch)
tree29ff083d3db0ef18fffe49f4b670031303a0ceff /testprogs
parent29e5e9e1e3b8f463bf782f3f42ce4a02cd55fca2 (diff)
downloadsamba-a533f398aa1fb8d95fa8aab9bc80fe277abb3384.tar.gz
samba-a533f398aa1fb8d95fa8aab9bc80fe277abb3384.tar.bz2
samba-a533f398aa1fb8d95fa8aab9bc80fe277abb3384.zip
r9345: used the data blob functions in the echo.js test code
(This used to be commit f217f08b679ec3ed4784ed0fe74e9cbb935cdce9)
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/ejs/echo.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/testprogs/ejs/echo.js b/testprogs/ejs/echo.js
index aa44ca7eb0..2875d1fb0e 100755
--- a/testprogs/ejs/echo.js
+++ b/testprogs/ejs/echo.js
@@ -22,10 +22,11 @@ libinclude("base.js");
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 @@ function test_EchoData(echo)
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 @@ function test_SourceData(echo)
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 @@ function test_TestSurrounding(echo)
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 @@ if (options.ARGV.length != 1) {
}
var binding = options.ARGV[0];
var echo = rpcecho_init();
+datablob_init(echo);
print("Connecting to " + binding + "\n");
status = echo.connect(binding);