1 |
|
unit Test9; |
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 9: Database Information tests} |
12 |
|
|
28 |
|
private |
29 |
|
procedure GetDBInformation(Attachment: IAttachment); |
30 |
|
public |
31 |
< |
function TestTitle: string; override; |
32 |
< |
procedure RunTest(CharSet: string; SQLDialect: integer); override; |
31 |
> |
function TestTitle: AnsiString; override; |
32 |
> |
procedure RunTest(CharSet: AnsiString; SQLDialect: integer); override; |
33 |
|
end; |
34 |
|
|
35 |
|
implementation |
41 |
|
begin |
42 |
|
DBInfo := Attachment.GetDBInformation([isc_info_db_id,isc_info_allocation,isc_info_base_level, |
43 |
|
isc_info_implementation,isc_info_no_reserve,isc_info_ods_minor_version, |
44 |
< |
isc_info_ods_version,isc_info_page_size,isc_info_version]); |
44 |
> |
isc_info_ods_version,isc_info_page_size,isc_info_version,isc_info_db_read_only]); |
45 |
|
WriteDBInfo(DBInfo); |
46 |
|
|
47 |
|
DBInfo := Attachment.GetDBInformation([isc_info_current_memory, isc_info_forced_writes, |
59 |
|
WriteDBInfo(DBInfo); |
60 |
|
end; |
61 |
|
|
62 |
< |
function TTest9.TestTitle: string; |
62 |
> |
function TTest9.TestTitle: AnsiString; |
63 |
|
begin |
64 |
|
Result := 'Test 9: Database Information tests'; |
65 |
|
end; |
66 |
|
|
67 |
< |
procedure TTest9.RunTest(CharSet: string; SQLDialect: integer); |
67 |
> |
procedure TTest9.RunTest(CharSet: AnsiString; SQLDialect: integer); |
68 |
|
var DPB: IDPB; |
69 |
|
Attachment: IAttachment; |
70 |
|
begin |