Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-04

FPCUnit: change proposal

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

We use FPCUnit and DUnit2 (branch of DUnit v1) extensively in the tiOPF [http://www.tiopf.com] project. DUnit2 has some impressive enhancements added and improved design.

One of the improvements is built-in support of SetupOnce/TeardownOnce without the need for Decorators. Currently we have to add lots of IFDEF's in the unit test code to make it compilable with DUnit2 and FPCUnit. Though the latter is falling behind on features.

Would there be any objections if I added built-in support for SetupOnce/TeardownOnce in FPCUnit (without the need for decorators)?

Some developers don't like the Decorator approach much. Here are some comments from them:
----------- Quotes -----------------
* I'd do everything possible to stay away from the Decorator (a problem looking for a solution)

* There is no natural linkage between the decorator, the target code and shared data. Besides they clutter the treeview. ------------------------------------

Regards,
- Graeme -

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

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 13 lines
Hi, We use FPCUnit and DUnit2 (branch of DUnit v1) extensively in the tiOPF [http://www.tiopf.com] project. DUnit2 has some impressive enhancements added and improved design. One of the improvements is built-in support of SetupOnce/TeardownOnce without the need for Decorators. Currently we have to add lots of IFDEF's in the unit test code to make it compilable with DUnit2 and FPCUnit. Though the latter is falling behind on features. Would there be any objections if I added built-in support for SetupOnce/TeardownOnce in FPCUnit (without the need for decorators)?

If you leave the decorators intact, I don't see why not. I don't think using one excludes the other ?

Michael.

Show quoted text 25 lines
Some developers don't like the Decorator approach much. Here are some comments from them: ----------- Quotes ----------------- * I'd do everything possible to stay away from the Decorator (a problem looking for a solution) * There is no natural linkage between the decorator, the target code and shared data. Besides they clutter the treeview. ------------------------------------ Regards, - Graeme - _______________________________________________________ fpGUI - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
If you leave the decorators intact, I don't see why not. I don't think using one excludes the other ?

No, the plan was to leave the decorators as is. Simply add more functionality to the fpcunit.pp file.

Regards,
- Graeme -

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

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
Michael Van Canneyt wrote: > > If you leave the decorators intact, I don't see why not. I don't think > using one excludes the other ? > No, the plan was to leave the decorators as is. Simply add more functionality to the fpcunit.pp file.

In that case, you have my blessing ;-)

Michael.

Reply by email