Skip to content

Commit 6f97e6b

Browse files
authored
[fuchsia][libc] Include missing macro definitions (#79639)
PR 79573 introduced `ASSERT_ERRNO_*` macros for use in libc tests. Introduce these macro definitions to FuchsiaTest.h for string tests to compile on Fuchsia.
1 parent 3fa1423 commit 6f97e6b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libc/test/UnitTest/FuchsiaTest.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313

1414
#define WITH_SIGNAL(X) #X
1515

16+
// These macros are used in string unittests.
17+
#define ASSERT_ERRNO_EQ(VAL) ASSERT_EQ(VAL, static_cast<int>(libc_errno))
18+
#define ASSERT_ERRNO_SUCCESS() ASSERT_EQ(0, static_cast<int>(libc_errno))
19+
#define ASSERT_ERRNO_FAILURE() ASSERT_NE(0, static_cast<int>(libc_errno))
20+
1621
#ifndef EXPECT_DEATH
1722
// Since zxtest has ASSERT_DEATH but not EXPECT_DEATH, wrap calling it
1823
// in a lambda returning void to swallow any early returns so that this

0 commit comments

Comments
 (0)