[libc-commits] [libc] [libc] Remove extraneous ASSERT_ERRNO_* macro definitions (PR #132812)

Roland McGrath via libc-commits libc-commits at lists.llvm.org
Mon Mar 24 12:00:19 PDT 2025


https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/132812

These are no longer meant to be defined in each
framework-specific header, but ZxTest.h wasn't updated.


>From e7a81bc88a064e7fc056e6c5b6cbc33dd1e389d3 Mon Sep 17 00:00:00 2001
From: Roland McGrath <mcgrathr at google.com>
Date: Mon, 24 Mar 2025 11:58:54 -0700
Subject: [PATCH] [libc] Remove extraneous ASSERT_ERRNO_* macro definitions

These are no longer meant to be defined in each
framework-specific header, but ZxTest.h wasn't updated.
---
 libc/test/UnitTest/ZxTest.h | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/libc/test/UnitTest/ZxTest.h b/libc/test/UnitTest/ZxTest.h
index 0881902d62b3b..ac616dbcb03f0 100644
--- a/libc/test/UnitTest/ZxTest.h
+++ b/libc/test/UnitTest/ZxTest.h
@@ -14,14 +14,6 @@
 
 #define WITH_SIGNAL(X) #X
 
-// These macros are used in string unittests.
-#define ASSERT_ERRNO_EQ(VAL)                                                   \
-  ASSERT_EQ(VAL, static_cast<int>(LIBC_NAMESPACE::libc_errno))
-#define ASSERT_ERRNO_SUCCESS()                                                 \
-  ASSERT_EQ(0, static_cast<int>(LIBC_NAMESPACE::libc_errno))
-#define ASSERT_ERRNO_FAILURE()                                                 \
-  ASSERT_NE(0, static_cast<int>(LIBC_NAMESPACE::libc_errno))
-
 #ifndef EXPECT_DEATH
 // Since zxtest has ASSERT_DEATH but not EXPECT_DEATH, wrap calling it
 // in a lambda returning void to swallow any early returns so that this



More information about the libc-commits mailing list