Browse Source

* Override EnableIgnore in TDecorator
* Pass EnableIgnore to TTest when a test is added to a TSuite

git-svn-id: trunk@11896 -

michael 17 years ago
parent
commit
5499e08c05
2 changed files with 14 additions and 0 deletions
  1. 1 0
      packages/fcl-fpcunit/src/fpcunit.pp
  2. 13 0
      packages/fcl-fpcunit/src/testdecorator.pp

+ 1 - 0
packages/fcl-fpcunit/src/fpcunit.pp

@@ -1035,6 +1035,7 @@ begin
   FTests.Add(ATest);
   FTests.Add(ATest);
   if ATest.TestSuiteName = '' then
   if ATest.TestSuiteName = '' then
     ATest.TestSuiteName := Self.TestName;
     ATest.TestSuiteName := Self.TestName;
+  ATest.EnableIgnores := Self.EnableIgnores;
 end;
 end;
 
 
 
 

+ 13 - 0
packages/fcl-fpcunit/src/testdecorator.pp

@@ -33,6 +33,9 @@ type
     function GetTestName: string; override;
     function GetTestName: string; override;
     function GetTestSuiteName: string; override;
     function GetTestSuiteName: string; override;
     procedure SetTestSuiteName(const aName: string); override;
     procedure SetTestSuiteName(const aName: string); override;
+  protected
+    function GetEnableIgnores: boolean; override;
+    procedure SetEnableIgnores(Value: boolean); override;
   public
   public
     function CountTestCases: integer; override;
     function CountTestCases: integer; override;
     constructor Create(aTest: TTest); reintroduce; overload;
     constructor Create(aTest: TTest); reintroduce; overload;
@@ -71,6 +74,16 @@ begin
   FTest.TestSuiteName := aName;
   FTest.TestSuiteName := aName;
 end;
 end;
 
 
+function TTestDecorator.GetEnableIgnores: boolean;
+begin
+  result := FTest.EnableIgnores;
+end;
+
+procedure TTestDecorator.SetEnableIgnores(Value: boolean);
+begin
+  FTest.EnableIgnores := Value;
+end;
+
 function TTestDecorator.CountTestCases: integer;
 function TTestDecorator.CountTestCases: integer;
 begin
 begin
   Result := FTest.CountTestCases;
   Result := FTest.CountTestCases;