Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libc / test / UnitTest / FuchsiaTest.h
blob07a6e9b3f6bde5affae037addd84198455d7ea7f
1 //===-- Header for setting up the Fuchsia tests -----------------*- C++ -*-===//
2 //
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
6 //
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
16 #ifndef EXPECT_DEATH
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); }())
21 #endif
23 namespace LIBC_NAMESPACE::testing {
24 using Test = ::zxtest::Test;
27 #endif // LLVM_LIBC_UTILS_UNITTEST_FUCHSIATEST_H