#ifndef LLVM_LIBC_TEST_SRC_MATH_ROUNDTOINTEGERTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_ROUNDTOINTEGERTEST_H
-#include "src/errno/llvmlibc_errno.h"
#include "utils/FPUtil/FPBits.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include "utils/UnitTest/Test.h"
void testOneInput(RoundToIntegerFunc func, F input, I expected,
bool expectError) {
#if math_errhandling & MATH_ERRNO
- llvmlibc_errno = 0;
+ errno = 0;
#endif
#if math_errhandling & MATH_ERREXCEPT
__llvm_libc::fputil::clearExcept(FE_ALL_EXCEPT);
ASSERT_EQ(__llvm_libc::fputil::testExcept(FE_ALL_EXCEPT), FE_INVALID);
#endif
#if math_errhandling & MATH_ERRNO
- ASSERT_EQ(llvmlibc_errno, EDOM);
+ ASSERT_EQ(errno, EDOM);
#endif
} else {
#if math_errhandling & MATH_ERREXCEPT
ASSERT_EQ(__llvm_libc::fputil::testExcept(FE_ALL_EXCEPT), 0);
#endif
#if math_errhandling & MATH_ERRNO
- ASSERT_EQ(llvmlibc_errno, 0);
+ ASSERT_EQ(errno, 0);
#endif
}
}
#include <math.h>
#if math_errhandling & MATH_ERRNO
-#include "src/errno/llvmlibc_errno.h"
#include <errno.h>
#endif
FPBits<F> bits(x);
auto setDomainErrorAndRaiseInvalid = []() {
#if math_errhandling & MATH_ERRNO
- llvmlibc_errno = EDOM;
+ errno = EDOM; // NOLINT
#endif
#if math_errhandling & MATH_ERREXCEPT
raiseExcept(FE_INVALID);