Re: [eigen] Bug in traspose

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

> 1) Tests can't be templated (because Qt signals and slots are not 
> templatable). I would like to write a template testProduct<typename 
> MatrixType>() and register testProduct<Matrix2d>, testProduct<MatrixXf> ...

No idea... maybe since the script only checks if the method name starts with "test" it'll work.
Needs to be tested though.

> 
> 2) One can't add command-line options without bypassing QTestLib's default 
> command line options. So in Eigen's tests we can't use QTestLib's options 
> anymore like the one allowing to run only one specific test. (By the way does 
> CxxTest allow running only one test?)

Either write a custom runner or dynamically create the list of tests to run.
I don't think there is an option though.

Cheers
Ben

> 
> Ian: Thank you for the CMakeLists!
> 
> Cheers,
> 
> Benoit
> 
> On Wednesday 16 January 2008 04:40:19 Schleimer, Ben wrote:
> > Hi,
> >
> > > The fact that my unit-tests did not catch this bug is interesting (I can
> > > see the reason). I will keep that in mind for the next round of
> > > unit-tests improvements (alpha4?). I am also thinking that QTestLib is
> > > not very good for us, actually I am already bypassing large parts of it
> > > in the main() function, so we might get rid of it.
> >
> > I wanted to add that this bug is a perfect chance to demonstrate why unit
> > tests are *a really good idea*.
> > Implement a test which fails because of this bug and then change the code
> > to make the test pass. Then you'll have the bug squished forever. Dont just
> > fix the bug and then don't update your unit tests. Switching to a different
> > testing framework is not so important.
> >
> > Cheers
> > Ben
> >
> > > Cheers,
> > >
> > > Benoit
> > >
> > > On Tuesday 15 January 2008 00:27:09 ollupaC De La Pradera wrote:
> > > > Hello,
> > > >
> > > > I think there's a bug in Transpose.h, at least in current svn revision
> > > > (761491):
> > > >     enum {
> > > >       RowsAtCompileTime = MatrixType::Traits::ColsAtCompileTime,
> > > >       ColsAtCompileTime = MatrixType::Traits::RowsAtCompileTime,
> > > >       MaxRowsAtCompileTime = MatrixType::Traits::MaxRowsAtCompileTime,
> > > >       MaxColsAtCompileTime = MatrixType::Traits::MaxColsAtCompileTime
> > > >     };
> > > > should be:
> > > >     enum {
> > > >       RowsAtCompileTime = MatrixType::Traits::ColsAtCompileTime,
> > > >       ColsAtCompileTime = MatrixType::Traits::RowsAtCompileTime,
> > > >       MaxRowsAtCompileTime = MatrixType::Traits::MaxColsAtCompileTime,
> > > >       MaxColsAtCompileTime = MatrixType::Traits::MaxRowsAtCompileTime
> > > >     };
> > > >
> > > > It's being more difficult that what I initially thought to refresh my
> > > > algebra and numerical methods while trying to understand all that
> > > > complex templates stuff, but I'm still here working even if I don't
> > > > show up a lot.
> > > >
> > > > By the way, I'm not sure if I have to post it here, or to some
> > > > bugzilla, or just send it to Jacob?
> > > >
> > > > Cheers
> > > >
> > > > Ramon
> 
> 
> 






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/