From c11204339ae86604a6edd6491f5ee03bf5e3c950 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 8 Jul 2005 04:55:07 +0000 Subject: r8220: added auto-generation of ENUM constants in ejs wrapper. So we can now use the enum name instead of a integer in ejs scripts making rpc calls (This used to be commit a61cdee384c3002860016c1740276529493d318d) --- testprogs/ejs/echo.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'testprogs') diff --git a/testprogs/ejs/echo.js b/testprogs/ejs/echo.js index 4bc8fdefb1..df12e46486 100644 --- a/testprogs/ejs/echo.js +++ b/testprogs/ejs/echo.js @@ -185,18 +185,18 @@ function test_TestEnum(conn) print("Testing echo_TestEnum\n"); - io.input.foo1 = 1; + io.input.foo1 = ECHO_ENUM1; io.input.foo2 = new Object(); - io.input.foo2.e1 = 1; - io.input.foo2.e2 = 1; + io.input.foo2.e1 = ECHO_ENUM1; + io.input.foo2.e2 = ECHO_ENUM1_32; io.input.foo3 = new Object(); - io.input.foo3.e1 = 2; + io.input.foo3.e1 = ECHO_ENUM2; 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); + assert(io.output.foo1 == ECHO_ENUM1); + assert(io.output.foo2.e1 == ECHO_ENUM2); + assert(io.output.foo2.e2 == ECHO_ENUM1_32); + assert(io.output.foo3.e1 == ECHO_ENUM2); } /* -- cgit