THRIFT-2886 Integrate binary type in standard Thrift cross test
Client: C_glib, C++, D, Erlang, Go, Haskell, Lua, Java/Me, JavaScript, Node, Ocaml, Perl, PHP, Python, Ruby
Patch: Jens Geyer
This closes #341
Minimal server-side implementations and TODO stubs for various languages to let "make check" succeeed.
Not contained in this patch and still TODO:
- client side implementations, i.e. calls to testBinary() and appropriate tests
- server side hex printout missing for some languages
diff --git a/lib/erl/test/test_client.erl b/lib/erl/test/test_client.erl
index db4d2d1..4e85c47 100644
--- a/lib/erl/test/test_client.erl
+++ b/lib/erl/test/test_client.erl
@@ -83,6 +83,7 @@
{Client06, {ok, 0}} = thrift_client:call(Client05, testI32, [0]),
{Client07, {ok, -34359738368}} = thrift_client:call(Client06, testI64, [-34359738368]),
{Client08, {ok, -5.2098523}} = thrift_client:call(Client07, testDouble, [-5.2098523]),
+ %% TODO: add testBinary() call
{Client09, {ok, DemoXtruct}} = thrift_client:call(Client08, testStruct, [DemoXtruct]),
{Client10, {ok, DemoNest}} = thrift_client:call(Client09, testNest, [DemoNest]),
{Client11, {ok, DemoDict}} = thrift_client:call(Client10, testMap, [DemoDict]),
diff --git a/lib/erl/test/test_server.erl b/lib/erl/test/test_server.erl
index a4145d6..77357ff 100644
--- a/lib/erl/test/test_server.erl
+++ b/lib/erl/test/test_server.erl
@@ -81,6 +81,10 @@
io:format("testDouble: ~p~n", [Double]),
{reply, Double};
+handle_function(testBinary, {S}) when is_binary(S) ->
+ io:format("testBinary: ~p~n", [S]),
+ {reply, S};
+
handle_function(testStruct,
{Struct = #'Xtruct'{string_thing = String,
byte_thing = Byte,