26 lines · cpp
1//===-- Unittests for cprojf ----------------------------------------------===//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-exception6//7//===----------------------------------------------------------------------===//8 9#include "CprojTest.h"10 11#include "src/complex/cprojf.h"12 13#include "utils/MPCWrapper/MPCUtils.h"14 15using LlvmLibcCprojTestMPC = LIBC_NAMESPACE::testing::FPTest<float>;16 17namespace mpc = LIBC_NAMESPACE::testing::mpc;18 19TEST_F(LlvmLibcCprojTestMPC, MPCRND) {20 _Complex float test = 5.0 + 10.0i;21 EXPECT_MPC_MATCH_ALL_ROUNDING(mpc::Operation::Cproj, test,22 LIBC_NAMESPACE::cprojf(test), 0.5);23}24 25LIST_CPROJ_TESTS(_Complex float, float, LIBC_NAMESPACE::cprojf)26