~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/packages/fcl-db/tests/dbtestframework.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
program dbtestframework;
 
2
 
 
3
{$IFDEF FPC}
 
4
  {$mode objfpc}{$H+}
 
5
{$ENDIF}
 
6
 
 
7
{ $DEFINE STOREDB}
 
8
 
 
9
{$APPTYPE CONSOLE}
 
10
 
 
11
uses
 
12
  SysUtils,
 
13
  fpcunit,  testreport, testregistry,
 
14
{$IFDEF STOREDB}
 
15
  DBResultsWriter,
 
16
{$ENDIF}
 
17
  toolsunit,
 
18
// Units wich contains the tests
 
19
  testbasics, testsqlfieldtypes, testdbbasics;
 
20
  
 
21
var
 
22
  FXMLResultsWriter: TXMLResultsWriter;
 
23
{$IFDEF STOREDB}
 
24
  FDBResultsWriter: TDBResultsWriter;
 
25
{$ENDIF}
 
26
  testResult: TTestResult;
 
27
begin
 
28
  testResult := TTestResult.Create;
 
29
  FXMLResultsWriter := TXMLResultsWriter.Create;
 
30
{$IFDEF STOREDB}
 
31
  FDBResultsWriter := TDBResultsWriter.Create;
 
32
{$ENDIF}
 
33
  try
 
34
    testResult.AddListener(FXMLResultsWriter);
 
35
{$IFDEF STOREDB}
 
36
    testResult.AddListener(FDBResultsWriter);
 
37
{$ENDIF}
 
38
    FXMLResultsWriter.WriteHeader;
 
39
{$IFDEF STOREDB}
 
40
    FDBResultsWriter.OpenConnection(dbconnectorname+';'+dbconnectorparams);
 
41
{$ENDIF}
 
42
    GetTestRegistry.Run(testResult);
 
43
    FXMLResultsWriter.WriteResult(testResult);
 
44
{$IFDEF STOREDB}
 
45
    FDBResultsWriter.CloseConnection;
 
46
{$ENDIF}
 
47
  finally
 
48
    testResult.Free;
 
49
    FXMLResultsWriter.Free;
 
50
{$IFDEF STOREDB}
 
51
    FDBResultsWriter.Free;
 
52
{$ENDIF}
 
53
  end;
 
54
end.