diff options
author | Jens Geyer <jensg@apache.org> | 2015-09-22 00:11:01 +0200 |
---|---|---|
committer | Jens Geyer <jensg@apache.org> | 2015-09-22 00:29:32 +0200 |
commit | fa2daef14bae4aea655a94b91a2e4c479debf9c2 (patch) | |
tree | fc0b4b99a788342f120518df6d586eb1cefb3a75 /test | |
parent | 39ba6b71f575432140db5fbd0debee232f097194 (diff) | |
download | thrift-fa2daef14bae4aea655a94b91a2e4c479debf9c2.tar.gz |
THRIFT-3341 Add testBool methods
Client: Haxe
Patch: Jens Geyer
This closes #614
Diffstat (limited to 'test')
-rw-r--r-- | test/haxe/src/TestClient.hx | 13 | ||||
-rw-r--r-- | test/haxe/src/TestServerHandler.hx | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test/haxe/src/TestClient.hx b/test/haxe/src/TestClient.hx index 8e43c76df..5c0de7c76 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"'); diff --git a/test/haxe/src/TestServerHandler.hx b/test/haxe/src/TestServerHandler.hx index abcef1349..74a8805d4 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 |