Exit early if unit tests fail

This commit is contained in:
Jacob Dufault 2017-12-27 07:54:03 -08:00
parent b8e7a5bcb3
commit ef4af128fc

View File

@ -430,7 +430,7 @@ int main(int argc, char** argv) {
doctest::Context context;
context.applyCommandLine(argc, argv);
int res = context.run();
if (context.shouldExit())
if (res != 0 || context.shouldExit())
return res;
}