[Insight-developers] preprocessor definition in tests

Luis Ibanez luis.ibanez at kitware.com
Thu Apr 22 10:04:04 EDT 2010


Hi Arnaud,

Yes, we should avoid the use of #defines for declaring constants,
and we should also avoid using globals in the tests (actually we
should avoid globals anywhere...).

It is a great idea to make this a bug entry, or a "task" for new
developers. It will be indeed a nice way of getting familiar with
the system and the software process without risking to much
to break anything.


   Thanks for pointing this out.


        Luis


-------------------------------------------------------
On Wed, Apr 21, 2010 at 6:03 PM, Arnaud GELAS
<arnaud_gelas at hms.harvard.edu>wrote:

> Hi guys,
>
> I was looking at itkImagePCAShapeModelEstimatorTest.cxx, and find out that
> there was many #define constant.
> So I changed it to variables definition in the main, it works fine now.
>
> But by doing a grep of #define on this directory, I find out that there are
> some tests which use them.
> I guess it is better to avoid using #define, right?
>
> I guess that simple task of changing #define by a definition in the main,
> with an experimental build on the dashboard, could be an excellent exercice
> for someone who recently enrolled in ITK Adopt a bug 2.0. Right?
>
> Cheers,
> Arnaud
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100422/97d15d14/attachment.htm>


More information about the Insight-developers mailing list