diff --git a/test/haxe/src/TestClient.hx b/test/haxe/src/TestClient.hx
index 276cd0f..f77620f 100644
--- a/test/haxe/src/TestClient.hx
+++ b/test/haxe/src/TestClient.hx
@@ -21,6 +21,7 @@
 
 import haxe.Int32;
 import haxe.Int64;
+import haxe.io.Bytes;
 import haxe.Timer;
 import haxe.ds.IntMap;
 import haxe.ds.StringMap;
@@ -307,6 +308,43 @@
     }
 
 
+	public static function BytesToHex(data : Bytes) : String {
+		var hex = "";
+		for ( i in 0 ... data.length) {
+			hex += StringTools.hex( data.get(i), 2);
+		}
+		return hex;
+	}
+
+	public static function PrepareTestData(randomDist : Bool) : Bytes	{
+		var retval = Bytes.alloc(0x100);
+		var initLen : Int = (retval.length > 0x100 ? 0x100 : retval.length);
+
+		// linear distribution, unless random is requested
+		if (!randomDist) {
+			for (i in 0 ... initLen) { 
+				retval.set(i, i % 0x100);
+			}
+			return retval;
+		}
+
+		// random distribution
+		for (i in 0 ... initLen) { 
+			retval.set(i, 0);
+		}
+		for (i in 1 ... initLen) { 
+			while( true) {
+				var nextPos = Std.random(initLen);
+				if (retval.get(nextPos) == 0) {
+					retval.set( nextPos, i % 0x100);
+					break;
+				}
+			}
+		}
+		return retval;
+	}
+
+	
     public static function ClientTest( transport : TTransport, protocol : TProtocol,
                                        args : Arguments, rslt : TestResults) : Void
     {
@@ -417,6 +455,23 @@
         trace(' = $dub');
         rslt.Expect(dub == 5.325098235, '$dub == 5.325098235');
 
+        var binOut = PrepareTestData(true);
+        trace('testBinary('+BytesToHex(binOut)+')');
+        try {
+            var binIn = client.testBinary(binOut);
+			trace('testBinary() = '+BytesToHex(binIn));
+			rslt.Expect( binIn.length == binOut.length, '${binIn.length} == ${binOut.length}');
+			var len = ((binIn.length < binOut.length)  ?  binIn.length  : binOut.length);
+            for (ofs in 0 ... len) {
+                if (binIn.get(ofs) != binOut.get(ofs)) {
+					rslt.Expect( false, 'testBinary('+BytesToHex(binOut)+'): content mismatch at offset $ofs');
+				}
+			}
+		}
+		catch (e : TApplicationException) {
+            trace('testBinary('+BytesToHex(binOut)+'): '+e.errorMsg);  // may not be supported by the server
+        }
+
 
         rslt.StartTestGroup( TestResults.EXITCODE_FAILBIT_STRUCTS);
 
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
