
18 Jul
2008
18 Jul
'08
12:50 p.m.
I use the Boost Test library extensively, and to save time, I always define BOOST_TEST_MAIN and add tests using BOOST_AUTO_TEST_CASE. This works fine for most projects, but now I need to test some MFC code. In order for MFC objects to work correctly, I need to make a call to AfxWinInit, but the only way I can see to do this is to define my own init_unit_test_suite function and add tests 'by hand', rather than using BOOST_AUTO_TEST_CASE. Does anyone know of a way I can avoid adding tests by hand? Does the Boost auto main stuff make a call to any init function I can override, so I can squeeze in an MFC init call? Thanks in advance.