mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +00:00
THRIFT-3341 Add testBool methods
Client: Delphi Patch: Jens Geyer
This commit is contained in:
parent
2a640c4ca2
commit
39ba6b71f5
@ -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+'"');
|
||||
|
||||
|
@ -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 + '")');
|
||||
|
Loading…
Reference in New Issue
Block a user