Skip to content

Commit

Permalink
return res right away instead of on shouldExit() only
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilDohne committed Jul 7, 2024
1 parent 4a5281b commit c394420
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions PhotoshopTest/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ int main()
doctest::Context context;

// set defaults
context.setOption("abort-after", 5); // stop test execution after 5 failed assertions
context.setOption("abort-after", 5); // stop test execution after 5 failed

int res = context.run(); // run

if (context.shouldExit()) // important - query flags (and --exit) rely on the user doing this
return res; // propagate the result of the tests
return res;
}

0 comments on commit c394420

Please sign in to comment.