Re: [eigen] Bug in traspose

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


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/