ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/testsuite/testsuite.dpr
(Generate patch)

Comparing ibx/trunk/fbintf/testsuite/testsuite.dpr (file contents):
Revision 143 by tony, Fri Feb 23 12:11:21 2018 UTC vs.
Revision 402 by tony, Mon Aug 1 10:07:24 2022 UTC

# Line 5 | Line 5 | program testsuite;
5   {$R *.res}
6  
7   uses
8 <  SysUtils,
9 <  IB,
8 >  System.SysUtils,
9 >  FBTestApp in 'FBTestApp.pas',
10    Test1 in 'Test1.pas',
11 <  test2 in 'test2.pas',
11 >  Test2 in 'Test2.pas',
12    Test3 in 'Test3.pas',
13    Test4 in 'Test4.pas',
14    Test5 in 'Test5.pas',
# Line 23 | Line 23 | uses
23    Test14 in 'Test14.pas',
24    Test15 in 'Test15.pas',
25    Test16 in 'Test16.pas',
26 <  TestManager in 'TestManager.pas',
27 <  FBOutputBlock in '..\client\FBOutputBlock.pas';
28 <
29 < procedure WriteHelp;
30 < begin
31 <  { add your help code here }
32 <  writeln(OutFile,'Usage: ', ParamStr(0), ' -h');
33 < end;
34 <
35 < function GetCmdLineValue(const Switch: string; var aValue: string): boolean;
36 < var i: integer;
37 < begin
38 <  Result := FindCmdLineSwitch(Switch,false);
39 <  if Result then
40 <  begin
41 <    for i := 0 to ParamCount do
42 <      if (ParamStr(i) = '-' + Switch) and (i <= ParamCount) then
43 <      begin
44 <        aValue := ParamStr(i+1);
45 <        exit;
46 <      end;
47 <    Result := false;
48 <  end;
49 < end;
50 <
26 >  Test17 in 'Test17.pas',
27 >  Test18 in 'Test18.pas',
28 >  Test19 in 'Test19.pas',
29 >  Test20 in 'Test20.pas',
30 >  Test21 in 'Test21.pas',
31 >  Test22 in 'Test22.pas',
32 >  TestApplication in 'testApp\TestApplication.pas';
33  
34   var
35 <  ErrorMsg: AnsiString;
36 <  FTestID: integer;
37 <  aValue: string;
38 < begin
39 <  try
40 <
59 <  FTestID := 0;
60 <  AssignFile(OutFile,'');
61 <  ReWrite(outFile);
62 <
63 <  
64 <  // parse parameters
65 <  if FindCmdLineSwitch('h') or FindCmdLineSwitch('help') then
66 <  begin
67 <    WriteHelp;
68 <    Exit;
69 <  end;
70 <
71 <  if GetCmdLineValue('t',aValue) then
72 <    FTestID := StrToInt(aValue);
73 <
74 <  if TestMgr <> nil then
75 <  begin
76 <    if GetCmdLineValue('u',aValue) or GetCmdLineValue('user',aValue) then
77 <      TestMgr.SetUserName(aValue);
78 <
79 <    if GetCmdLineValue('p',aValue) or GetCmdLineValue('passwd',aValue) then
80 <      TestMgr.SetPassword(aValue);
81 <
82 <    if GetCmdLineValue('e',aValue) or GetCmdLineValue('employeedb',aValue) then
83 <      TestMgr.SetEmployeeDatabaseName(aValue);
84 <
85 <    if GetCmdLineValue('n',aValue) or GetCmdLineValue('newdbname',aValue) then
86 <      TestMgr.SetNewDatabaseName(aValue);
87 <
88 <    if GetCmdLineValue('s',aValue) or GetCmdLineValue('secondnewdbname',aValue) then
89 <      TestMgr.SetSecondNewDatabaseName(aValue);
90 <
91 <    if GetCmdLineValue('b',aValue) or GetCmdLineValue('backupfile',aValue) then
92 <      TestMgr.SetBackupFileName(aValue);
93 <
94 <    if GetCmdLineValue('o',aValue) or GetCmdLineValue('outfile',aValue) then
95 <    begin
96 <      system.Assign(outFile,aValue);
97 <      ReWrite(outFile);
98 <    end;
99 <
100 <    TestMgr.ShowStatistics := FindCmdLineSwitch('S',false) or FindCmdLineSwitch('stats');
101 <
102 <    {Ensure consistent date reporting across platforms}
103 <    {$IF declared(FormatSettings)}
104 <    FormatSettings.ShortDateFormat := 'd/m/yyyy';
105 <    FormatSettings.LongTimeFormat := 'HH:MM:SS';
106 <    FormatSettings.DateSeparator := '/';
107 <    {$ELSE}
108 <    ShortDateFormat := 'd/m/yyyy';
109 <    LongTimeFormat := 'HH:MM:SS';
110 <    DateSeparator := '/';
111 <    {$IFEND}
112 <
113 <    writeln(OutFile,'Firebird Client API Test Suite');
114 <    writeln(OutFile,'Copyright MWA Software 2016');
115 <    writeln(OutFile);
116 <    writeln(OutFile,'Starting Tests');
117 <    writeln(OutFile,'Client API Version = ',FirebirdAPI.GetImplementationVersion);
118 <
119 <    if FTestID = 0 then
120 <      TestMgr.RunAll
121 <    else
122 <      TestMgr.Run(FTestID);
123 <    TestMgr.Free;
124 <  end;
125 <
126 <  writeln(OutFile,'Test Suite Ends');
127 <  Flush(OutFile);
128 <  //readln; {uncomment if running from IDE and console window closes before you can view results}
129 <
130 <  except
131 <    on E: Exception do
132 <      Writeln(E.ClassName, ': ', E.Message);
133 <  end;
35 >  Application: TTestApplication;
36 > begin
37 >  Application := TTestApplication.Create(nil);
38 >  Application.Title:='Firebird API Test Suite';
39 >  Application.Run;
40 >  Application.Free;
41   end.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines