Re: [eigen] Bug in traspose

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


On January 16, 2008 12:59:55 pm Schleimer, Ben wrote:
> 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.

CxxTest doesn't seem designed specifically to test template functions, 
although of course you could always do something like

        template<int Number>
        void template_test()
        {
            cout << "Testing " << Number << endl;
        }

        void test_template()
        {
            template_test<1>();
            template_test<2>();
        };

(Note that the template name itself cannot start with 'test', or CxxTest will 
try to run it directly - that might work if all the template parameters have 
default values, but that's probably not what you'd want anyways...)

>
> > 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.

I don't see a built-in way to pass command-line options to the tests, or only 
running one test in a suite.  I don't know if this helps at all, but if you 
use the CTest testing framework bundled with CMake, you can use the -R 
command line option to only run test executables whose name matches a given 
regular expression, so you could (for instance) prefix each of your test 
names with 'linux_' or 'windows_' or whatever and then run 'ctest -R linux' 
or 'ctest -R windows' depending on what platform you're on.

-Ian



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