diff --git a/test/test_binary.js b/test/test_binary.js index 0261aa7a..0971ecb0 100644 --- a/test/test_binary.js +++ b/test/test_binary.js @@ -71,7 +71,11 @@ function run_test (test, ser) { pl2.push(session.call('com.myapp.echo', [vals1[i]]).then( function (res) { - test.log("Result [com.myapp.echo]:", res); + if (Buffer.isBuffer(res)) { + test.log("Result [com.myapp.echo]:", res.toString('hex')); + } else { + test.log("Result [com.myapp.echo]:", res); + } }, function (err) { test.log("Error [com.myapp.echo]:", err.error, err.args, err.kwargs); @@ -83,7 +87,11 @@ function run_test (test, ser) { pl2.push(session.call('any.echo', [vals1[i]]).then( function (res) { - test.log("Result [any.echo]:", res); + if (Buffer.isBuffer(res)) { + test.log("Result [any.echo]:", res.toString('hex')); + } else { + test.log("Result [any.echo]:", res); + } }, function (err) { test.log("Error [any.echo]:", err.error, err.args, err.kwargs); diff --git a/test/test_binary_cbor.txt b/test/test_binary_cbor.txt index d4367544..00ca30a1 100644 --- a/test/test_binary_cbor.txt +++ b/test/test_binary_cbor.txt @@ -7,14 +7,14 @@ 6 "Result [any.echo]:" {"a":5,"b":"hello2"} 7 "Result [any.echo]:" [-9007199254740991,9007199254740991] 8 "Result [any.echo]:" null -9 "Result [any.echo]:" [0,1,2,3,4,5,6,7] -10 "Result [any.echo]:" [143,68,213,9,224,73,42,206,196,252,16,154,3,10,92,117,31,6,63,183,67,204,56,143,14,215,34,186,204,59,198,108] +9 "Result [any.echo]:" "0001020304050607" +10 "Result [any.echo]:" "8f44d509e0492acec4fc109a030a5c751f063fb743cc388f0ed722bacc3bc66c" 11 "Result [com.myapp.echo]:" 1.7 12 "Result [com.myapp.echo]:" "hello" 13 "Result [com.myapp.echo]:" [1,2,-3] 14 "Result [com.myapp.echo]:" {"a":5,"b":"hello2"} 15 "Result [com.myapp.echo]:" [-9007199254740991,9007199254740991] 16 "Result [com.myapp.echo]:" null -17 "Result [com.myapp.echo]:" [0,1,2,3,4,5,6,7] -18 "Result [com.myapp.echo]:" [143,68,213,9,224,73,42,206,196,252,16,154,3,10,92,117,31,6,63,183,67,204,56,143,14,215,34,186,204,59,198,108] +17 "Result [com.myapp.echo]:" "0001020304050607" +18 "Result [com.myapp.echo]:" "8f44d509e0492acec4fc109a030a5c751f063fb743cc388f0ed722bacc3bc66c" 19 "All finished."