1 |
|
unit Test16; |
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 16: Error handling} |
12 |
|
|
35 |
|
|
36 |
|
TTest16 = class(TTestBase) |
37 |
|
private |
38 |
< |
procedure DBTests(CharSet: string; SQLDialect: integer); |
39 |
< |
procedure ServiceTests(CharSet: string; SQLDialect: integer); |
38 |
> |
procedure DBTests(CharSet: AnsiString; SQLDialect: integer); |
39 |
> |
procedure ServiceTests(CharSet: AnsiString; SQLDialect: integer); |
40 |
|
public |
41 |
< |
function TestTitle: string; override; |
42 |
< |
procedure RunTest(CharSet: string; SQLDialect: integer); override; |
41 |
> |
function TestTitle: AnsiString; override; |
42 |
> |
procedure RunTest(CharSet: AnsiString; SQLDialect: integer); override; |
43 |
|
end; |
44 |
|
|
45 |
|
|
47 |
|
|
48 |
|
{ TTest16 } |
49 |
|
|
50 |
< |
procedure TTest16.DBTests(CharSet: string; SQLDialect: integer); |
50 |
> |
procedure TTest16.DBTests(CharSet: AnsiString; SQLDialect: integer); |
51 |
|
var DPB: IDPB; |
52 |
|
Attachment: IAttachment; |
53 |
|
Transaction: ITransaction; |
113 |
|
end; |
114 |
|
end; |
115 |
|
|
116 |
< |
procedure TTest16.ServiceTests(CharSet: string; SQLDialect: integer); |
116 |
> |
procedure TTest16.ServiceTests(CharSet: AnsiString; SQLDialect: integer); |
117 |
|
var SPB: ISPB; |
118 |
|
Service: IServiceManager; |
119 |
|
I: integer; |
120 |
< |
ServerName: string; |
121 |
< |
DBName: string; |
120 |
> |
ServerName: AnsiString; |
121 |
> |
DBName: AnsiString; |
122 |
|
begin |
123 |
|
if not FirebirdAPI.HasServiceAPI then Exit; |
124 |
|
|
155 |
|
end; |
156 |
|
end; |
157 |
|
|
158 |
< |
function TTest16.TestTitle: string; |
158 |
> |
function TTest16.TestTitle: AnsiString; |
159 |
|
begin |
160 |
|
Result := 'Test 16: Error handling'; |
161 |
|
end; |
162 |
|
|
163 |
< |
procedure TTest16.RunTest(CharSet: string; SQLDialect: integer); |
163 |
> |
procedure TTest16.RunTest(CharSet: AnsiString; SQLDialect: integer); |
164 |
|
begin |
165 |
|
DBTests(Charset,SQLDialect); |
166 |
|
ServiceTests(Charset,SQLDialect); |