1add_libc_testsuite(libc_fenv_unittests)
2
3add_libc_unittest(
4  rounding_mode_test
5  SUITE
6    libc_fenv_unittests
7  SRCS
8    rounding_mode_test.cpp
9  DEPENDS
10    libc.src.fenv.fegetround
11    libc.src.fenv.fesetround
12)
13
14add_libc_unittest(
15  exception_status_test
16  SUITE
17    libc_fenv_unittests
18  SRCS
19    exception_status_test.cpp
20  DEPENDS
21    libc.src.fenv.feclearexcept
22    libc.src.fenv.feraiseexcept
23    libc.src.fenv.fetestexcept
24    libc.utils.FPUtil.fputil
25)
26
27if (NOT LLVM_USE_SANITIZER)
28  # Sanitizers don't like SIGFPE. So, we will run the
29  # tests which raise SIGFPE only in non-sanitizer builds.
30  add_libc_unittest(
31    enabled_exceptions_test
32    SUITE
33      libc_fenv_unittests
34    SRCS
35      enabled_exceptions_test.cpp
36    DEPENDS
37      libc.include.signal
38      libc.src.fenv.feclearexcept
39      libc.src.fenv.feraiseexcept
40      libc.src.fenv.fetestexcept
41      libc.utils.FPUtil.fputil
42  )
43endif()
44