[libc-commits] [libc] [libc][NFC] fix fdopen_test comparisons (PR #232104)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Wed Oct 14 15:55:31 PDT 2026


================
@@ -75,14 +75,14 @@ TEST_F(LlvmLibcStdioFdopenTest, InvalidMode) {
   // `Mode` must be one of "r", "w" or "a"
   auto *fp = LIBC_NAMESPACE::fdopen(fd, "m+");
   ASSERT_ERRNO_EQ(EINVAL);
-  ASSERT_TRUE(nullptr == fp);
+  ASSERT_EQ(fp, nullptr);
 
   // If the mode argument is invalid, then `fdopen` returns a nullptr and sets
   // the `errno` to EINVAL. In this case the `mode` param can only be "r" or
   // "r+"
   auto *fp2 = LIBC_NAMESPACE::fdopen(fd, "w");
   ASSERT_ERRNO_EQ(EINVAL);
-  ASSERT_TRUE(nullptr == fp2);
+  ASSERT_EQ(fp, nullptr);
----------------
michaelrj-google wrote:

good catch! Yes that was a mistake

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


More information about the libc-commits mailing list