AMDG Jon Black wrote:
I have a bunch of dll projects that make up an application. I'd like to unit test these projects, but I have two problems:
1) The classes I'd like to test are in the dll and not all of them are exported; 2) Boost.Test doesn't have a main entry point, so if I solve 1 by packing my tests in the dll, how can I run them?
If there is a better solution to 1, I'd love to hear it. Otherwise, how can I solve 2?
As long as you make sure that the dll is loaded before main,
you can use the auto-registration mechanism. This works
with msvc:
// test.cpp (compiled into a dll)
#include