[fpc-devel] [patch] - FPCUnit (new overloaded RegisterTest functions)

Graeme Geldenhuys graemeg.lists at gmail.com
Thu May 24 10:35:22 CEST 2007


Hi,

Attached is a patch for FPCUnit, to be applied from the root source
directory.  I really hope this patch can make it into the 2.2 branch
as well.  I took extra care to make sure there is no problems and
tested it in 4 different FPCUnit projects.

Changes:
Added two new overloaded RegisterTest() functions that take a Suite
Path as a parameter. The suite path will be translated into individual
TTestSuite classes and reuse classes if they already exist. Path
delimiters are '.' or '/' or '\' characters.

This makes it much easier to group your unit tests in a hierarchy
without having to manually create the TTestSuite classes yourself.  I
got the idea from the DUnit project.

examples of valid suite paths

  'SuiteA.SuiteB.SuiteC'
  'SuiteA\SuiteB\SuiteC'
  'SuiteA/SuiteB/SuiteC'
  'SuiteA.SuiteB\SuiteC/SuiteD'


Regards,
  Graeme
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpcunit.patch
Type: text/x-patch
Size: 4037 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20070524/0097cabf/attachment.bin>


More information about the fpc-devel mailing list