[Lazarus] TTestSuite

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Feb 10 08:54:41 CET 2009


On Tue, Feb 10, 2009 at 6:02 AM, Lee Jenkins <lee at datatrakpos.com> wrote:
>
> Would anyone mind providing a simple example or useful link?  I've already
> looked at this:

Lee, did you not look at the tiOPF test suite?  ;-)

Do you mean the following....


  TMoneyTest = class(TTestCase)
  protected
    procedure SetUp; override;
    procedure TearDown; override;
  published
    procedure testBagCreate;
    procedure testBagMultiply;
    procedure testBagNegate;
    procedure testBagSimpleAdd;
    procedure testBagSubtract;
    procedure testBagSumAdd;
    ....
  end.

initialization
  RegisterTests([TMoneyTest]);


The "fcl-fpcunit" directory contains a few examples.  tiOPF contains a
LOT of examples. I think somewhere in FPC, they also use FPCunit, so
there should be more examples.

Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the Lazarus mailing list