Does heavy use of unit tests discourage the use of debug asserts? It seems like a debug assert firing in the code under test implies the unit test shouldn\'t exist or the d
A good unit test setup will have the ability to catch asserts. If an assert is triggered the current test should fail and the next is run.
In our libraries low-level debug functionality such as TTY/ASSERTS have handlers that are called. The default handler will printf/break, but client code can install custom handlers for different behavior.
Our UnitTest framework installs its own handlers that log messages and throw exceptions on asserts. The UnitTest code will then catch these exceptions if they occur and log them as an fail, along with the asserted statement.
You can also include assert testing in your unit test - e.g.
CHECK_ASSERT(someList.getAt(someList.size() + 1); // test passes if an assert occurs