THRIFT-3341 Add testBool methods
Client: Delphi
Patch: Jens Geyer
diff --git a/lib/delphi/test/TestClient.pas b/lib/delphi/test/TestClient.pas
index 08b3965..5f375ef 100644
--- a/lib/delphi/test/TestClient.pas
+++ b/lib/delphi/test/TestClient.pas
@@ -510,6 +510,11 @@
client.testVoid();
Expect( TRUE, 'testVoid()'); // success := no exception
+ s := BoolToString( client.testBool(TRUE));
+ Expect( s = BoolToString(TRUE), 'testBool(TRUE) = '+s);
+ s := BoolToString( client.testBool(FALSE));
+ Expect( s = BoolToString(FALSE), 'testBool(FALSE) = '+s);
+
s := client.testString('Test');
Expect( s = 'Test', 'testString(''Test'') = "'+s+'"');
diff --git a/lib/delphi/test/TestServer.pas b/lib/delphi/test/TestServer.pas
index 4f599ea..018282c 100644
--- a/lib/delphi/test/TestServer.pas
+++ b/lib/delphi/test/TestServer.pas
@@ -58,6 +58,7 @@
FServer : IServer;
protected
procedure testVoid();
+ function testBool(thing: Boolean): Boolean;
function testString(const thing: string): string;
function testByte(thing: ShortInt): ShortInt;
function testI32(thing: Integer): Integer;
@@ -394,6 +395,12 @@
end;
end;
+function TTestServer.TTestHandlerImpl.testBool(thing: Boolean): Boolean;
+begin
+ Console.WriteLine('testBool(' + BoolToStr(thing,true) + ')');
+ Result := thing;
+end;
+
function TTestServer.TTestHandlerImpl.testString( const thing: string): string;
begin
Console.WriteLine('teststring("' + thing + '")');