[libc-commits] [PATCH] D156940: [libc] Use ASSERT_DEATH for EXPECT_DEATH under Fuchsia zxtest

Roland McGrath via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 2 14:09:52 PDT 2023


mcgrathr created this revision.
mcgrathr added reviewers: abrachet, Caslyn.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
mcgrathr requested review of this revision.

The Fuchsia zxtest library has ASSERT_DEATH but not EXPECT_DEATH.
The latter may be added in the future, but for now just use the
former as substitute.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156940

Files:
  libc/test/UnitTest/FuchsiaTest.h


Index: libc/test/UnitTest/FuchsiaTest.h
===================================================================
--- libc/test/UnitTest/FuchsiaTest.h
+++ libc/test/UnitTest/FuchsiaTest.h
@@ -13,6 +13,10 @@
 
 #define WITH_SIGNAL(X) #X
 
+#ifndef EXPECT_DEATH
+#define EXPECT_DEATH(FUNC, SIG) ASSERT_DEATH(FUNC, SIG)
+#endif
+
 namespace __llvm_libc::testing {
 using Test = ::zxtest::Test;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156940.546601.patch
Type: text/x-patch
Size: 388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230802/13cebec0/attachment.bin>


More information about the libc-commits mailing list