From ef4af128fcc9bd48fe7870a2e1b9ebcd4e8237a4 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Wed, 27 Dec 2017 07:54:03 -0800 Subject: [PATCH] Exit early if unit tests fail --- src/command_line.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command_line.cc b/src/command_line.cc index e133c29e..0bab6e62 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -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; }