diff --git a/lib/haxe/test/src/Main.hx b/lib/haxe/test/src/Main.hx
new file mode 100644
index 0000000..fff8be5
--- /dev/null
+++ b/lib/haxe/test/src/Main.hx
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package;
+
+import org.apache.thrift.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.server.*;
+import org.apache.thrift.meta_data.*;
+
+import thrift.test.*;  // generated code
+
+class Main
+{
+    static public function main()
+    {
+		try
+		{
+        	StreamTest.Run();
+			
+			trace("All tests completed.");
+		}
+		catch( e: Dynamic)
+		{
+			trace('$e');
+		}
+	}
+}
\ No newline at end of file
diff --git a/lib/haxe/test/src/StreamTest.hx b/lib/haxe/test/src/StreamTest.hx
new file mode 100644
index 0000000..b28c8e9
--- /dev/null
+++ b/lib/haxe/test/src/StreamTest.hx
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package;
+
+import haxe.Int64;
+
+import org.apache.thrift.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.server.*;
+import org.apache.thrift.meta_data.*;
+
+import thrift.test.*;  // generated code
+
+
+class StreamTest extends TestBase {
+	
+
+	private inline static var tmpfile : String = "bin/data.tmp";
+	
+
+	private static function Expect( expr : Bool, info : String, ?pos : haxe.PosInfos) : Void {
+		if( ! expr) {
+			throw ('Test "$info" failed at '+pos.methodName+' in '+pos.fileName+':'+pos.lineNumber);
+		}			
+	}
+	
+	private static function MakeTestData() : Xtruct {
+		var data : Xtruct = new Xtruct();
+		data.string_thing = "Streamtest";
+		data.byte_thing = -128;
+		data.i32_thing = 4711;
+		data.i64_thing = Int64.make(0x12345678,0x9ABCDEF0);
+		return data;
+	}
+	
+	public static function WriteData() : Xtruct
+	{
+		var stream : TStream = new TFileStream( tmpfile, CreateNew);
+		var trans : TTransport = new TStreamTransport( null, stream);
+		var prot = new TJSONProtocol( trans);
+
+		var data = MakeTestData();	
+		data.write(prot);
+		trans.close();
+		
+		return data;
+	}
+	
+	public static function ReadData() : Xtruct
+	{
+		var stream : TStream = new TFileStream( tmpfile, Read);
+		var trans : TTransport = new TStreamTransport( stream, null);
+		var prot = new TJSONProtocol( trans);
+
+		var data : Xtruct = new Xtruct();
+		data.read(prot);
+		trans.close();
+		
+		return data;
+	}
+	
+	public static override function Run() : Void
+	{
+		var written = WriteData();
+		var read = ReadData();
+
+		Expect( read.string_thing == written.string_thing, "string data");
+		Expect( read.byte_thing == written.byte_thing, "byte data");
+		Expect( read.i32_thing == written.i32_thing, "i32 data");
+		Expect( Int64.compare( read.i64_thing, written.i64_thing) == 0, "i64 data");
+	}
+
+}
+
+
diff --git a/lib/haxe/test/src/TestBase.hx b/lib/haxe/test/src/TestBase.hx
new file mode 100644
index 0000000..03b66dd
--- /dev/null
+++ b/lib/haxe/test/src/TestBase.hx
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package;
+
+import org.apache.thrift.*;
+import org.apache.thrift.protocol.*;
+import org.apache.thrift.transport.*;
+import org.apache.thrift.server.*;
+import org.apache.thrift.meta_data.*;
+
+import thrift.test.*;  // generated code
+
+class TestBase {
+	
+	private function new() {
+		// override, if necessary
+	}
+	
+	public static function Run() : Void {
+      	throw new AbstractMethodError();
+	}	
+}
