[libc++] In tests, use `abort` to terminate upon an error.
authorKonstantin Varlamov <varconst@apple.com>
Fri, 10 Feb 2023 19:31:26 +0000 (11:31 -0800)
committervarconst <varconsteq@gmail.com>
Fri, 10 Feb 2023 19:31:51 +0000 (11:31 -0800)
Differential Revision: https://reviews.llvm.org/D143245

libcxx/test/support/assert_macros.h

index 5d5d810..80076fd 100644 (file)
@@ -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) {