
29 Mar
2006
29 Mar
'06
2:28 p.m.
I would like to use the BOOST_AUTO_TEST_CASE() facility in a static library. Obviously this library does not have a main() so it needs to be linked with a test executable which may run test cases found in one or more of those static libraries. Unfortunately, the tests do not make it past the linker. The executable links fine but runs none of the tests defined in the libraries. Could it be that BOOST_AUTO_TEST_CASE() works via some global which gets stripped when the static lib is created? Do you have a suggestion for a workaround? The idea is to keep some of the lowest-level unit test code in the same translation unit as the class implementation. Thanks, pj