fpc/packages/fcl-registry/tests/regtestframework.pp
florian 35682fdc81 resolved #8555
* fixed KeyExists on windows
+ added simple test for KeyExists

git-svn-id: trunk@7063 -
2007-04-06 13:50:54 +00:00

54 lines
1.1 KiB
ObjectPascal

program regtestframework;
{$IFDEF FPC}
{$mode objfpc}{$H+}
{$ENDIF}
{ $DEFINE STOREDB}
{$APPTYPE CONSOLE}
uses
SysUtils,
fpcunit, testreport, testregistry,
{$IFDEF STOREDB}
DBResultsWriter,
{$ENDIF}
// Units wich contains the tests
testbasics;
var
FXMLResultsWriter: TXMLResultsWriter;
{$IFDEF STOREDB}
FDBResultsWriter: TDBResultsWriter;
{$ENDIF}
testResult: TTestResult;
begin
testResult := TTestResult.Create;
FXMLResultsWriter := TXMLResultsWriter.Create;
{$IFDEF STOREDB}
FDBResultsWriter := TDBResultsWriter.Create;
{$ENDIF}
try
testResult.AddListener(FXMLResultsWriter);
{$IFDEF STOREDB}
testResult.AddListener(FDBResultsWriter);
{$ENDIF}
FXMLResultsWriter.WriteHeader;
{$IFDEF STOREDB}
FDBResultsWriter.OpenConnection(dbconnectorname+';'+dbconnectorparams);
{$ENDIF}
GetTestRegistry.Run(testResult);
FXMLResultsWriter.WriteResult(testResult);
{$IFDEF STOREDB}
FDBResultsWriter.CloseConnection;
{$ENDIF}
finally
testResult.Free;
FXMLResultsWriter.Free;
{$IFDEF STOREDB}
FDBResultsWriter.Free;
{$ENDIF}
end;
end.