You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2015/09/22 00:29:58 UTC

[2/2] thrift git commit: THRIFT-3341 Add testBool methods Client: Haxe Patch: Jens Geyer

THRIFT-3341 Add testBool methods
Client: Haxe
Patch: Jens Geyer

This closes #614


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/fa2daef1
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/fa2daef1
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/fa2daef1

Branch: refs/heads/master
Commit: fa2daef14bae4aea655a94b91a2e4c479debf9c2
Parents: 39ba6b7
Author: Jens Geyer <je...@apache.org>
Authored: Tue Sep 22 00:11:01 2015 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Tue Sep 22 00:29:32 2015 +0200

----------------------------------------------------------------------
 test/haxe/src/TestClient.hx        | 13 +++++++++++++
 test/haxe/src/TestServerHandler.hx | 13 +++++++++++++
 2 files changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/fa2daef1/test/haxe/src/TestClient.hx
----------------------------------------------------------------------
diff --git a/test/haxe/src/TestClient.hx b/test/haxe/src/TestClient.hx
index 8e43c76..5c0de7c 100644
--- a/test/haxe/src/TestClient.hx
+++ b/test/haxe/src/TestClient.hx
@@ -322,6 +322,8 @@ class TestClient {
 
     // core module unit tests
     public static function ModuleUnitTests( args : Arguments, rslt : TestResults) : Void {
+		#if debug
+		
         try {
             BitConverter.UnitTest();
             rslt.Expect( true, 'BitConverter.UnitTest  Test #100');
@@ -337,6 +339,8 @@ class TestClient {
         catch( e : Dynamic) {
             rslt.Expect( false, 'ZigZag.UnitTest: $e  Test #101');
         }
+		
+		#end
     }
 
 
@@ -457,6 +461,15 @@ class TestClient {
         trace(' = void');
         rslt.Expect(true,"testVoid()");  // bump counter
 
+        trace('testBool(${true})');
+        var b = client.testBool(true);
+        trace(' = $b');
+		rslt.Expect(b, '$b == "${true}"');
+        trace('testBool(${false})');
+        b = client.testBool(false);
+        trace(' = $b');
+		rslt.Expect( ! b, '$b == "${false}"');
+
         trace('testString("Test")');
         var s = client.testString("Test");
         trace(' = "$s"');

http://git-wip-us.apache.org/repos/asf/thrift/blob/fa2daef1/test/haxe/src/TestServerHandler.hx
----------------------------------------------------------------------
diff --git a/test/haxe/src/TestServerHandler.hx b/test/haxe/src/TestServerHandler.hx
index abcef13..74a8805 100644
--- a/test/haxe/src/TestServerHandler.hx
+++ b/test/haxe/src/TestServerHandler.hx
@@ -51,6 +51,19 @@ class TestServerHandler implements ThriftTest {
         trace("testVoid()");
     }
 
+	/**
+	* Prints 'testBool("%s")' where '%s' with thing as 'true' or 'false'
+	* @param bool  thing - the bool data to print
+	* @return bool  - returns the bool 'thing'
+	* 
+	* @param thing
+	*/
+	public function testBool(thing : Bool) : Bool
+    {
+        trace('testBool($thing)');
+        return thing;
+    }
+
     /**
     * Prints 'testString("%s")' with thing as '%s'
     * @param string thing - the string to print