diff options
| author | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2008-10-13 14:17:06 +0000 |
|---|---|---|
| committer | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2008-10-13 14:17:06 +0000 |
| commit | ba3bee101bb254c82cc70143432b74befa386086 (patch) | |
| tree | 96d28d39b8ad78ddfcf17656996656af134f35ce | |
| parent | 5557e62dc0425338b3ab913f9ef9b8b416f75d2a (diff) | |
| download | fpc-ba3bee101bb254c82cc70143432b74befa386086.tar.gz | |
* Override EnableIgnore in TDecorator
* Pass EnableIgnore to TTest when a test is added to a TSuite
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11896 3ad0048d-3df7-0310-abae-a5850022a9f2
| -rw-r--r-- | packages/fcl-fpcunit/src/fpcunit.pp | 1 | ||||
| -rw-r--r-- | packages/fcl-fpcunit/src/testdecorator.pp | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/packages/fcl-fpcunit/src/fpcunit.pp b/packages/fcl-fpcunit/src/fpcunit.pp index 00b44d71df..04e305e3d7 100644 --- a/packages/fcl-fpcunit/src/fpcunit.pp +++ b/packages/fcl-fpcunit/src/fpcunit.pp @@ -1035,6 +1035,7 @@ begin FTests.Add(ATest); if ATest.TestSuiteName = '' then ATest.TestSuiteName := Self.TestName; + ATest.EnableIgnores := Self.EnableIgnores; end; diff --git a/packages/fcl-fpcunit/src/testdecorator.pp b/packages/fcl-fpcunit/src/testdecorator.pp index 6c497eeb70..c30523ea35 100644 --- a/packages/fcl-fpcunit/src/testdecorator.pp +++ b/packages/fcl-fpcunit/src/testdecorator.pp @@ -33,6 +33,9 @@ type function GetTestName: string; override; function GetTestSuiteName: string; override; procedure SetTestSuiteName(const aName: string); override; + protected + function GetEnableIgnores: boolean; override; + procedure SetEnableIgnores(Value: boolean); override; public function CountTestCases: integer; override; constructor Create(aTest: TTest); reintroduce; overload; @@ -71,6 +74,16 @@ begin FTest.TestSuiteName := aName; end; +function TTestDecorator.GetEnableIgnores: boolean; +begin + result := FTest.EnableIgnores; +end; + +procedure TTestDecorator.SetEnableIgnores(Value: boolean); +begin + FTest.EnableIgnores := Value; +end; + function TTestDecorator.CountTestCases: integer; begin Result := FTest.CountTestCases; |
