We are using cppunit in a project on a sun solaris 5.8 (sparc), and it crashes with a core dump when an assert fails. Even when I recompile and use "make check" the one test that should fail crahes.
We have found a solution, that is to link statically, but while our project grows things start to get more difficult with static compilation.
Is there a better solution? I have tested this problem on 2 different suns, and it's the same.
Thx in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have the same problem on AIX 4.3.3 with CPPUNIT 1.9.11:
e.g. CPPUNIT_ASSERT(1 == 2) or CPPUNIT_ASSERT(false) causes a crash.
Did you find a reason/solution for this problem?
Thanks
Oliver
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-09-26
Well I don't know the solution but it's not just CPPUNIT_ASSERT that causes an "Abort (core dumped)" for me. g++'s assert does the same. I don't think the problem lies in cppunit itself - for my setup in any case.
Ben.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We are using cppunit in a project on a sun solaris 5.8 (sparc), and it crashes with a core dump when an assert fails. Even when I recompile and use "make check" the one test that should fail crahes.
We have found a solution, that is to link statically, but while our project grows things start to get more difficult with static compilation.
Is there a better solution? I have tested this problem on 2 different suns, and it's the same.
Thx in advance
I'm not sure I undestant your problem. If you dinamically link the cppunit to your project it crashes?
regards
bernardo
I have the same problem on AIX 4.3.3 with CPPUNIT 1.9.11:
e.g. CPPUNIT_ASSERT(1 == 2) or CPPUNIT_ASSERT(false) causes a crash.
Did you find a reason/solution for this problem?
Thanks
Oliver
Well I don't know the solution but it's not just CPPUNIT_ASSERT that causes an "Abort (core dumped)" for me. g++'s assert does the same. I don't think the problem lies in cppunit itself - for my setup in any case.
Ben.
HI
It seems I know how to fix this proble.
(But don't know exactly, why).
try{
CPPUNIT_ASSERT_DOUBLES_EQUAL(10,100,4);
}catch(::std::exception &e)
{
::std::cout << e.what();
}
Well, but is it possible to avoid
handling exceptions around asserts?
It looks not very nice, as for me.
Do anybody solve this question?
Nick