ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/testsuite/Test11.pas
(Generate patch)

Comparing ibx/trunk/fbintf/testsuite/Test11.pas (file contents):
Revision 45 by tony, Tue Dec 6 10:33:46 2016 UTC vs.
Revision 56 by tony, Mon Mar 6 10:20:02 2017 UTC

# Line 1 | Line 1
1   unit Test11;
2 + {$IFDEF MSWINDOWS}
3 + {$DEFINE WINDOWS}
4 + {$ENDIF}
5  
6 < {$mode objfpc}{$H+}
6 > {$IFDEF FPC}
7 > {$mode delphi}
8   {$codepage utf8}
9 + {$ENDIF}
10  
11   {Test 11: Services API}
12  
# Line 33 | Line 38 | type
38  
39    TTest11 = class(TTestBase)
40    private
41 <    procedure GetStatistics(Service: IServiceManager; DBName: string);
42 <    procedure BackupRestore(Service: IServiceManager; DBName: string);
41 >    procedure GetStatistics(Service: IServiceManager; DBName: AnsiString);
42 >    procedure BackupRestore(Service: IServiceManager; DBName: AnsiString);
43    public
44 <    function TestTitle: string; override;
45 <    procedure RunTest(CharSet: string; SQLDialect: integer); override;
44 >    function TestTitle: AnsiString; override;
45 >    procedure RunTest(CharSet: AnsiString; SQLDialect: integer); override;
46    end;
47  
48   implementation
49  
50   { TTest11 }
51  
52 < procedure TTest11.GetStatistics(Service: IServiceManager; DBName: string);
52 > procedure TTest11.GetStatistics(Service: IServiceManager; DBName: AnsiString);
53   var Req: ISRB;
54      Results: IServiceQueryResults;
55   begin
# Line 158 | Line 163 | begin
163    writeln(OutFile);
164   end;
165  
166 < procedure TTest11.BackupRestore(Service: IServiceManager; DBName: string);
166 > procedure TTest11.BackupRestore(Service: IServiceManager; DBName: AnsiString);
167   var Req: ISRB;
168      Results: IServiceQueryResults;
169      BakFile: TFileStream;
# Line 168 | Line 173 | var Req: ISRB;
173      bytesWritten: integer;
174      bytesAvailable: integer;
175      i: integer;
176 <    RestoreDBName: string;
176 >    RestoreDBName: AnsiString;
177      Attachment: IAttachment;
178      DPB: IDPB;
179   begin
# Line 224 | Line 229 | begin
229          SQPB := Service.AllocateSQPB;
230          if ReqLength > 0 then
231              bytesWritten := SQPB.Add(isc_info_svc_line).CopyFrom(BakFile,ReqLength);
232 <        bytesAvailable -= bytesWritten;
232 >        bytesAvailable := bytesAvailable - bytesWritten;
233          Req := Service.AllocateSRB;
234          Req.Add(isc_info_svc_stdin);
235          Req.Add(isc_info_svc_line);
# Line 253 | Line 258 | begin
258    writeln(OutFile,'Database Dropped');
259   end;
260  
261 < function TTest11.TestTitle: string;
261 > function TTest11.TestTitle: AnsiString;
262   begin
263    Result := 'Test 11: Services API';
264   end;
265  
266 < procedure TTest11.RunTest(CharSet: string; SQLDialect: integer);
266 > procedure TTest11.RunTest(CharSet: AnsiString; SQLDialect: integer);
267   var SPB: ISPB;
268      Service: IServiceManager;
269      I: integer;
270 <    ServerName: string;
271 <    DBName: string;
270 >    ServerName: AnsiString;
271 >    DBName: AnsiString;
272   begin
273    if not FirebirdAPI.HasServiceAPI then Exit;
274  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines