[Boost.Test]Possible BOOST_CLASS_TEST_CASE bug

Code below doesn't compile. Workaround is provided also but is not satisfactory
-------------------------------------------------------------------------------
#include

Tomislav Adamic
Problem: ComplexTest::test1() is const method. BOOST_CLASS_TEST_CASE refuses to work properly with const methods. ComplexTest::test2() is not const and works as expected.
Workaround Methods from test classes that will be used by BOOST_CLASS_TEST_CASE should not be const.
Yes. This looks like boost.test issue. I'll fix it. You'll have to stick with non-const test case methods for now. What the big deal BTW? Gennadiy

Gennadiy Rozental wrote:
Tomislav Adamic
writes: Problem: ComplexTest::test1() is const method. BOOST_CLASS_TEST_CASE refuses to work properly with const methods. ComplexTest::test2() is not const and works as expected.
Workaround Methods from test classes that will be used by BOOST_CLASS_TEST_CASE should not be const.
Yes. This looks like boost.test issue. I'll fix it. You'll have to stick with non-const test case methods for now. What the big deal BTW?
Gennadiy
It is not a big deal, these are only tests... On the other hand, I am forced to change constnes of my method only to be able to use it in Boost.Test; not because my method actually needs to become non-const because of internal class matters... This is not good C++, don't you agree? Anyway, like I said, I can live with that... BTW, sorry if this has been posted before...
participants (2)
-
Gennadiy Rozental
-
Tomislav Adamic