|
Last change
on this file since 29 was 27, checked in by RBRi, 19 years ago |
|
first unit tests incl. simple framework
|
-
Property svn:eol-style
set to
native
|
|
File size:
884 bytes
|
| Line | |
|---|
| 1 | program Main;
|
|---|
| 2 |
|
|---|
| 3 | uses
|
|---|
| 4 | Classes,
|
|---|
| 5 | SysUtils,
|
|---|
| 6 | CmdLineParameterUnit,
|
|---|
| 7 | TestAssert,
|
|---|
| 8 | CmdLineParameterUnitTests;
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 | VAR
|
|---|
| 12 | tmpSuites : TList;
|
|---|
| 13 | tmpTests : TList;
|
|---|
| 14 | tmpAllTests : TList;
|
|---|
| 15 | tmpFunction : FUNCTION:TList;
|
|---|
| 16 | tmpTest : PROCEDURE;
|
|---|
| 17 | i,j,tmpTestCount : integer;
|
|---|
| 18 |
|
|---|
| 19 | BEGIN
|
|---|
| 20 | tmpAllTests := TList.Create;
|
|---|
| 21 | tmpSuites := TList.Create;
|
|---|
| 22 |
|
|---|
| 23 | tmpSuites.Add(@getCmdLineParameterUnitTests);
|
|---|
| 24 |
|
|---|
| 25 | tmpTestCount := 0;
|
|---|
| 26 | for i := 0 to tmpSuites.Count-1 do
|
|---|
| 27 | begin
|
|---|
| 28 | tmpFunction := tmpSuites.items[i];
|
|---|
| 29 | tmpTests := tmpFunction;
|
|---|
| 30 | for j := 0 to tmpTests.Count-1 do
|
|---|
| 31 | begin
|
|---|
| 32 | tmpTest := tmpTests.items[j];
|
|---|
| 33 | try
|
|---|
| 34 | tmpTest;
|
|---|
| 35 | Write('.');
|
|---|
| 36 |
|
|---|
| 37 | except
|
|---|
| 38 | on e:Exception do
|
|---|
| 39 | begin
|
|---|
| 40 | writeln;
|
|---|
| 41 | Writeln(e.message);
|
|---|
| 42 | end;
|
|---|
| 43 | end;
|
|---|
| 44 | tmpTestCount := tmpTestCount + 1;
|
|---|
| 45 | if (0 = tmpTestCount MOD 50) then writeln;
|
|---|
| 46 | end;
|
|---|
| 47 | end;
|
|---|
| 48 | END.
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.