1 |
+ |
(* |
2 |
+ |
* Firebird Interface (fbintf) Test suite. This program is used to |
3 |
+ |
* test the Firebird Pascal Interface and provide a semi-automated |
4 |
+ |
* pass/fail check for each test. |
5 |
+ |
* |
6 |
+ |
* The contents of this file are subject to the Initial Developer's |
7 |
+ |
* Public License Version 1.0 (the "License"); you may not use this |
8 |
+ |
* file except in compliance with the License. You may obtain a copy |
9 |
+ |
* of the License here: |
10 |
+ |
* |
11 |
+ |
* http://www.firebirdsql.org/index.php?op=doc&id=idpl |
12 |
+ |
* |
13 |
+ |
* Software distributed under the License is distributed on an "AS |
14 |
+ |
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
15 |
+ |
* implied. See the License for the specific language governing rights |
16 |
+ |
* and limitations under the License. |
17 |
+ |
* |
18 |
+ |
* The Initial Developer of the Original Code is Tony Whyman. |
19 |
+ |
* |
20 |
+ |
* The Original Code is (C) 2016 Tony Whyman, MWA Software |
21 |
+ |
* (http://www.mwasoftware.co.uk). |
22 |
+ |
* |
23 |
+ |
* All Rights Reserved. |
24 |
+ |
* |
25 |
+ |
* Contributor(s): ______________________________________. |
26 |
+ |
* |
27 |
+ |
*) |
28 |
+ |
|
29 |
|
unit Test8; |
30 |
+ |
{$IFDEF MSWINDOWS} |
31 |
+ |
{$DEFINE WINDOWS} |
32 |
+ |
{$ENDIF} |
33 |
|
|
34 |
< |
{$mode objfpc}{$H+} |
34 |
> |
{$IFDEF FPC} |
35 |
> |
{$mode delphi} |
36 |
|
{$codepage utf8} |
37 |
+ |
{$ENDIF} |
38 |
|
|
39 |
|
{Test 8: Create and read back an Array with 2 dimensions} |
40 |
|
|
54 |
|
interface |
55 |
|
|
56 |
|
uses |
57 |
< |
Classes, SysUtils, TestManager, IB; |
57 |
> |
Classes, SysUtils, TestApplication, FBTestApp, IB; |
58 |
|
|
59 |
|
type |
60 |
|
|
61 |
|
{ TTest8 } |
62 |
|
|
63 |
< |
TTest8 = class(TTestBase) |
63 |
> |
TTest8 = class(TFBTestBase) |
64 |
|
private |
65 |
|
procedure UpdateDatabase(Attachment: IAttachment); |
66 |
|
public |
67 |
< |
function TestTitle: string; override; |
68 |
< |
procedure RunTest(CharSet: string; SQLDialect: integer); override; |
67 |
> |
function TestTitle: AnsiString; override; |
68 |
> |
procedure RunTest(CharSet: AnsiString; SQLDialect: integer); override; |
69 |
|
end; |
70 |
|
|
71 |
|
implementation |
88 |
|
procedure TTest8.UpdateDatabase(Attachment: IAttachment); |
89 |
|
var Transaction: ITransaction; |
90 |
|
Statement: IStatement; |
58 |
– |
ResultSet: IResultSet; |
91 |
|
i,j,k : integer; |
92 |
|
ar: IArray; |
93 |
|
begin |
123 |
|
ReportResults(Statement); |
124 |
|
end; |
125 |
|
|
126 |
< |
function TTest8.TestTitle: string; |
126 |
> |
function TTest8.TestTitle: AnsiString; |
127 |
|
begin |
128 |
|
Result := 'Test 8: Create and read back an Array with 2 dimensions'; |
129 |
|
end; |
130 |
|
|
131 |
< |
procedure TTest8.RunTest(CharSet: string; SQLDialect: integer); |
131 |
> |
procedure TTest8.RunTest(CharSet: AnsiString; SQLDialect: integer); |
132 |
|
var DPB: IDPB; |
133 |
|
Attachment: IAttachment; |
134 |
|
begin |