Browse Source

* Correct name

Michaël Van Canneyt 2 years ago
parent
commit
1afe0114d4

+ 2 - 2
packages/fcl-fpcunit/src/fpcunit.pp

@@ -229,7 +229,7 @@ type
     function CreateResultAndRun: TTestResult; virtual;
     function CreateResultAndRun: TTestResult; virtual;
     procedure Run(AResult: TTestResult); override;
     procedure Run(AResult: TTestResult); override;
     function AsString: string;
     function AsString: string;
-    class function AsSuite : TTestSuite;
+    class function Suite : TTestSuite;
     property TestSuiteName: string read GetTestSuiteName write SetTestSuiteName;
     property TestSuiteName: string read GetTestSuiteName write SetTestSuiteName;
     Property ExpectedExceptionFailMessage  : String Read FExpectedExceptionFailMessage;
     Property ExpectedExceptionFailMessage  : String Read FExpectedExceptionFailMessage;
     Property ExpectedException : TClass Read FExpectedException;
     Property ExpectedException : TClass Read FExpectedException;
@@ -1013,7 +1013,7 @@ begin
   Result := TestName + '(' + ClassName + ')';
   Result := TestName + '(' + ClassName + ')';
 end;
 end;
 
 
-class function TTestCase.AsSuite: TTestSuite;
+class function TTestCase.Suite: TTestSuite;
 begin
 begin
   Result:=TTestSuite.Create(Self.ClassType);
   Result:=TTestSuite.Create(Self.ClassType);
 end;
 end;

+ 1 - 1
packages/fcl-fpcunit/src/tests/suitetest.pp

@@ -224,7 +224,7 @@ procedure TSuiteTest.testTestCaseAsSuite;
 var
 var
   ts: TTestSuite;
   ts: TTestSuite;
 begin
 begin
-  ts := TOneTestCase.AsSuite;
+  ts := TOneTestCase.Suite;
   try
   try
     AssertEquals(1, ts.CountTestCases);
     AssertEquals(1, ts.CountTestCases);
     AssertEquals(1, ts.Tests.Count);
     AssertEquals(1, ts.Tests.Count);