Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] Crash when running my unit tests
From: Christian Henning (chhenning_at_[hidden])
Date: 2009-04-30 14:28:35


Hi Ovanes,

>
> to avoid name collisions use anonymous namespaces if you don't really
> require the names outside the compilation unit:
>
> namespace
> {
>    BOOST_AUTO_TEST_CASE(read_image_test){}
> }
>
> This will ensure internal linkage for the names.

Thanks. I changed my code.

>
> My other other suggestion would be trying to disable as many TC's as
> possible in the problematic CPP to see what's going wrong there. If you
> debug in MSVC, you can switch on VS to break into the code as soon as some
> violation happens. This way you will be able to break into global
> initialization as well.

What do you mean by switch on VS? The debugger automatically breaks
when the assertion fires. Though, I know exactly where it happens. I
sent the location in my first email.

I did some testing in that direction but the crash happens before any
of the test case are invoked by boost::test. Looking at the call stack
reveals that boost::test is preparing the first test name, which is
done in "make_test_case(...)" inside the file
unit_test_suite_impl.hpp[255].

I don't know how boost::test is generating the loop to invoke all test
cases but maybe that process is the problem? Can you try to compile
the test suite? There is jamfile if that helps.

Thanks,
Christian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net