THRIFT-3341 Add testBool methods

Client: Delphi
Patch: Jens Geyer
This commit is contained in:
Jens Geyer 2015-09-22 00:00:49 +02:00
parent 2a640c4ca2
commit 39ba6b71f5
2 changed files with 12 additions and 0 deletions

View File

@ -510,6 +510,11 @@ begin
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+'"');

View File

@ -58,6 +58,7 @@ type
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 @@ begin
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 + '")');