This is similar to: https://stackoverflow.com/questions/1278831/unit-tests-in-production-release-code# but more specific.
At the moment the DLL I ship and the DLL I use for unit testing have different access. When doing unit testing, since I test each individual functions/classes, I add __declspec(dllexport)
to functions/classes that would be otherwise inaccessible.
IMO
Pros:
- Limits access to the end users. The company is planning to ship the product in a library form and I think this is important.
- For the packaged application, it checks external symbols during build. So there is reduced risk having inaccessible external error causing bug in shipped products.