Re: [eigen] Bug in traspose |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Bug in traspose
- From: Ian Mackenzie <ian.e.mackenzie@xxxxxxxxx>
- Date: Wed, 16 Jan 2008 21:01:59 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=4K8pmrMvM+w/tJvMJiRJHyBt/4XweoS/rI296gWfaYQ=; b=xcJO7/7YidF2Hol56YyvCZh/HQGdqIFxw09/T8CulwCA0ZVMra5O8oi6aQyNMbVZ7rBcPtOcb6+x22T5fYPK8O6yhYjHvuYcb1+vm5pH16Qbin0GOsOgM9v9fkA71CoDVUEAJvUV8JeV05Mwx2/zZQfTEYcM0JcDgOLcywsyy2E=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=hUc9ZX8w+P/8qyTGhzK9ubrnXfKBiW9XXygt9+bT3ywBZzDq9nGmt52FI3DievdCiB3X6qvQZ5AQNCcgHNDoCvwIcQ+xJKf/OyV8N+pcslk+1Edr8gViwHdRrmehvKVaoryjOWEeoVl9BWZgCXUy6Bvdbzr5YFthdGj/xAqt5Ic=
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