THRIFT-2886 Integrate binary type in standard Thrift cross test
Client: Haxe
Patch: Jens Geyer
diff --git a/test/haxe/src/TestServerHandler.hx b/test/haxe/src/TestServerHandler.hx
index 9fc7d14..9e2a633 100644
--- a/test/haxe/src/TestServerHandler.hx
+++ b/test/haxe/src/TestServerHandler.hx
@@ -117,6 +117,23 @@
}
/**
+ * Prints 'testBinary("%s")' where '%s' is a hex-formatted string of thing's data
+ * @param binary thing - the binary data to print
+ * @return binary - returns the binary 'thing'
+ *
+ * @param thing
+ */
+ public function testBinary(thing : haxe.io.Bytes) : haxe.io.Bytes
+ {
+ var hex = "";
+ for ( i in 0 ... thing.length) {
+ hex += StringTools.hex( thing.get(i), 2);
+ }
+ trace('testBinary($hex)');
+ return thing;
+ }
+
+ /**
* Prints 'testStruct("{%s}")' where thing has been formatted
* into a string of comma separated values
* @param Xtruct thing - the Xtruct to print