[fpc-pascal] FPCUnit: TestSuiteName vs TestName

Graeme Geldenhuys graemeg.lists at gmail.com
Mon May 21 11:02:24 CEST 2007


When would you use TestSuiteName and when TestName?

For example, the following I think is wrong.

constructor TTestSuite.Create(AName: string);
  FName := AName;

Shouldn't this set the FTestSuiteName field?
Now if I do a TestSuite.TestSuiteName it doesn't return FName, instead
it returns FTestSuiteName.  If I do a TestSuit.TestName it returns the

This problem seems to be confirmed with the following code:

constructor TTestSuite.Create(AClass: TClass; AName: string);
  FName := AName;

This is getting very confusing. When are we supposed to use
TestSuiteName and when do we use TestName?

For example in DUnit you can register a test as follows:
  RegisterTest(cSuiteNameNonPersistentTests, ATestCaseClass.Suite);

So if I want to implement this in FPCUnit, what name am I supposed to set?

Maybe I'm just getting confused with the difference between TTest,
TTestCase and TTestSuite. I go read some more on this in the DUnit web
page (do we have FPCUnit docs explaining this?).

Graeme Geldenhuys

General error, hit any user to continue.

More information about the fpc-pascal mailing list