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

via libc-commits libc-commits at lists.llvm.org
Mon Mar 24 12:01:54 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Roland McGrath (frobtech)

<details>
<summary>Changes</summary>

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


---
Full diff: https://github.com/llvm/llvm-project/pull/132812.diff


1 Files Affected:

- (modified) libc/test/UnitTest/ZxTest.h (-8) 


``````````diff
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

``````````

</details>


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


More information about the libc-commits mailing list