samedi 4 février 2017

C++ testing suite that survives asserts in code

I am trying to set up testing for my project, I have exceptions disabled and have defined my asserts to call std::abort. Both gtest and Catch are only able to fail on one test that calling std::abort as it kills the whole testing suite.
My projects compile into DLLs which the testing project/executable references. Aside from:

  1. enabling exceptions and having my asserts throw
  2. creating a custom compile target and doing something similar as to 1.
  3. restructuring code to not rely on assert to fail

do I have any other options? I would prefer not to enable exceptions because of design/speed concerns.

Aucun commentaire:

Enregistrer un commentaire