1 //===-- Header for setting up the Fuchsia tests -----------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_UTILS_UNITTEST_FUCHSIATEST_H
10 #define LLVM_LIBC_UTILS_UNITTEST_FUCHSIATEST_H
12 #include <zxtest/zxtest.h>
14 #define WITH_SIGNAL(X) #X
17 // Since zxtest has ASSERT_DEATH but not EXPECT_DEATH, wrap calling it
18 // in a lambda returning void to swallow any early returns so that this
19 // can be used in a function that itself returns non-void.
20 #define EXPECT_DEATH(FUNC, SIG) ([&] { ASSERT_DEATH(FUNC, SIG); }())
23 namespace LIBC_NAMESPACE::testing
{
24 using Test
= ::zxtest::Test
;
27 #endif // LLVM_LIBC_UTILS_UNITTEST_FUCHSIATEST_H