[libc-commits] [libc] [libc][math] Adds entrypoint and tests for nearbyintf128, scalbnf128 (PR #88443)

via libc-commits libc-commits at lists.llvm.org
Thu Apr 11 21:01:48 PDT 2024


================
@@ -0,0 +1,105 @@
+//===-- Utility class to test different flavors of nearbyint ----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_TEST_SRC_MATH_NEARBYINTTEST_H
+#define LLVM_LIBC_TEST_SRC_MATH_NEARBYINTTEST_H
+
+#include "src/__support/FPUtil/FEnvImpl.h"
+#include "src/__support/FPUtil/FPBits.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+#include <fenv.h>
----------------
lntue wrote:

Replace `<fenv.h>` with `hdr/fenv_macros.h` and add `libc.hdr.fenv_macros` to the tests' dependency.

https://github.com/llvm/llvm-project/pull/88443


More information about the libc-commits mailing list