Skip to content

Commit

Permalink
[libc++] In tests, use abort to terminate upon an error.
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D143245

(cherry picked from commit 8e13ec9)
  • Loading branch information
var-const authored and tru committed Feb 13, 2023
1 parent e171ce9 commit d19ef5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcxx/test/support/assert_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ std::string test_concat_message([[maybe_unused]] Args&&... args) {
[[noreturn]] void test_log_error(const char* condition, const char* file, int line, std::string&& message) {
const char* msg = condition ? "Assertion failure: " : "Unconditional failure:";
std::fprintf(stderr, "%s%s %s %d\n%s", msg, condition, file, line, message.c_str());
exit(EXIT_FAILURE);
std::abort();
}

inline void test_fail(const char* file, int line, std::string&& message) {
Expand Down

0 comments on commit d19ef5f

Please sign in to comment.