No, it isn't called, because Create is not a virtual function and not overloaded twice.
Correct.
TTestDecorator seems to be a BaseClass. e.g: You normally don't use TStrings, instead you use TStringList.
I did look at the implementation of
TTestDecorator before I decided to use it. The only other descendant of
TTestDecorator is the one that supplies
SetupOnce and
TearDownOnce, and even that is a very basic implementation. I didn't need the Setup/TeardownOnce functionality so saw no harm in descending my decorator directly from
TTestDecorator.
Anyway, I managed to do what I wanted in the end. A speed comparison between FPCUnit and FPTest (my DUnit2 fork). FPCUnit has so many flaws and is really slow in comparison to FPTest. Simply repeating a single Check(True) test say 20,000 times shows the huge speed difference between the two testing frameworks.
The usage of decorators is also massively inferior (usage and functionality) in FPCUnit compared to what you can do in FPTest.
Please note:
I was a long time user of FPCUnit, and contributed to its code. I have a few projects with massive and complex test suites. FPCUnit couldn't cope, and the bad decorator implementation caused havoc in my test suites. Hence I decided to port DUnit2 to FPC by starting the FPTest [
http://wiki.freepascal.org/FPTest] project.
If you are interested in the differences, take a look at this URL [
http://geldenhuys.co.uk/~graemeg/dunit2/] and read the
DUnit2 Description link. It is lengthy, but explains clearly what FPTest (and DUnit2) can do, what was improved and why.